|
45 | 45 | #include "TProfile2D.h" |
46 | 46 | #include "TStatistic.h" |
47 | 47 |
|
| 48 | +// TODO: Needed to show the info message in Snapshot, remove in 6.40 |
| 49 | +#include "ROOT/RLogger.hxx" |
| 50 | +#include "ROOT/RVersion.hxx" |
| 51 | +#include "TEnv.h" |
| 52 | +#include <cstdlib> |
| 53 | +#include <cstring> |
| 54 | + |
48 | 55 | #include <algorithm> |
49 | 56 | #include <cstddef> |
50 | 57 | #include <initializer_list> |
@@ -1332,6 +1339,26 @@ public: |
1332 | 1339 | const ColumnNames_t &columnList, |
1333 | 1340 | const RSnapshotOptions &options = RSnapshotOptions()) |
1334 | 1341 | { |
| 1342 | + // TODO: Remove before releasing 6.40.00 |
| 1343 | +#if ROOT_VERSION_CODE >= ROOT_VERSION(6, 40, 0) |
| 1344 | + static_assert(false && "Remove information about change of Snapshot defaut compression settings."); |
| 1345 | +#endif |
| 1346 | + [[maybe_unused]] static bool once = []() { |
| 1347 | + if (const char *suppress = std::getenv("ROOT_RDF_SNAPSHOT_INFO")) |
| 1348 | + if (std::strcmp(suppress, "0") == 0) |
| 1349 | + return true; |
| 1350 | + if (const char *suppress = gEnv->GetValue("ROOT.RDF.Snapshot.Info", "1")) |
| 1351 | + if (std::strcmp(suppress, "0") == 0) |
| 1352 | + return true; |
| 1353 | + RLogScopedVerbosity showInfo{ROOT::Detail::RDF::RDFLogChannel(), ROOT::ELogLevel::kInfo}; |
| 1354 | + R__LOG_INFO(ROOT::Detail::RDF::RDFLogChannel()) |
| 1355 | + << "\n\tIn ROOT 6.38, the default compression settings of Snapshot have been changed from 101 (ZLIB with " |
| 1356 | + "compression level 1, the TTree default) to 505 (ZSTD with compression level 5). This change may result " |
| 1357 | + "in smaller Snapshot output dataset size by default. In order to suppress this message, set " |
| 1358 | + "'ROOT_RDF_SNAPSHOT_INFO=0' in your environment or set 'ROOT.RDF.Snapshot.Info: 0' in your .rootrc " |
| 1359 | + "file."; |
| 1360 | + return true; |
| 1361 | + }(); |
1335 | 1362 | // like columnList but with `#var` columns removed |
1336 | 1363 | auto colListNoPoundSizes = RDFInternal::FilterArraySizeColNames(columnList, "Snapshot"); |
1337 | 1364 | // like columnListWithoutSizeColumns but with aliases resolved |
|
0 commit comments