Skip to content

Commit 5e922a1

Browse files
committed
Address PR review comments
1 parent 09afe35 commit 5e922a1

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

config/rootrc.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -612,3 +612,8 @@ Rint.Canvas.HighLightColor: 5
612612
# 1 All Branches (default)
613613
# Can be overridden by the environment variable ROOT_TTREECACHE_PREFILL
614614
# TTreeCache.Prefill: 1
615+
616+
# Set whether to suppress an info message coming from RDataFrame Snapshot
617+
# informing the user on the change of default output dataset compression
618+
# settings introduced in ROOT 6.38 (on by default)
619+
# ROOT.RDF.Snapshot.Info: 1

tree/dataframe/inc/ROOT/RDF/RInterface.hxx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#include "ROOT/TypeTraits.hxx"
3838
#include "RtypesCore.h" // for ULong64_t
3939
#include "TDirectory.h"
40+
#include "TEnv.h"
4041
#include "TH1.h" // For Histo actions
4142
#include "TH2.h" // For Histo actions
4243
#include "TH3.h" // For Histo actions
@@ -1341,15 +1342,19 @@ public:
13411342
static_assert(false && "Remove information about change of Snapshot defaut compression settings.");
13421343
#endif
13431344
[[maybe_unused]] static bool once = []() {
1344-
if (const char *suppress = std::getenv("ROOT_RDF_SILENCE_SNAPSHOT_INFO"))
1345-
if (std::strcmp(suppress, "1") == 0)
1345+
if (const char *suppress = std::getenv("ROOT_RDF_SNAPSHOT_INFO"))
1346+
if (std::strcmp(suppress, "0") == 0)
1347+
return true;
1348+
if (const char *suppress = gEnv->GetValue("ROOT.RDF.Snapshot.Info", "1"))
1349+
if (std::strcmp(suppress, "0") == 0)
13461350
return true;
13471351
RLogScopedVerbosity showInfo{ROOT::Detail::RDF::RDFLogChannel(), ROOT::ELogLevel::kInfo};
13481352
R__LOG_INFO(ROOT::Detail::RDF::RDFLogChannel())
1349-
<< "In ROOT 6.38, the default compression settings of Snapshot have been changed from 101 (ZLIB with "
1353+
<< "\n\tIn ROOT 6.38, the default compression settings of Snapshot have been changed from 101 (ZLIB with "
13501354
"compression level 1, the TTree default) to 505 (ZSTD with compression level 5). This change may result "
13511355
"in smaller Snapshot output dataset size by default. In order to suppress this message, set "
1352-
"ROOT_RDF_SILENCE_SNAPSHOT_INFO=1 in your environment.";
1356+
"'ROOT_RDF_SNAPSHOT_INFO=0' in your environment or set 'ROOT.RDF.Snapshot.Info: 0' in your .rootrc "
1357+
"file.";
13531358
return true;
13541359
}();
13551360
// like columnList but with `#var` columns removed

0 commit comments

Comments
 (0)