Skip to content

Commit b442bb4

Browse files
[PWGLF] Add isLoggingEnabled toggle to turn log output on or off (#15000)
1 parent 8fb77a6 commit b442bb4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

PWGLF/TableProducer/Resonances/resonanceMergeDF.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ using namespace o2::soa;
6363
struct ResonanceMergeDF {
6464
// SliceCache cache;
6565
Configurable<int> nDF{"nDF", 1, "no of combination of collision"};
66+
Configurable<bool> isLoggingEnabled{"isLoggingEnabled", 0, "print log"};
6667
Configurable<bool> cpidCut{"cpidCut", 0, "pid cut"};
6768
Configurable<bool> crejtpc{"crejtpc", 0, "reject electron pion"};
6869
Configurable<bool> crejtof{"crejtof", 0, "reject electron pion tof"};
@@ -175,7 +176,8 @@ struct ResonanceMergeDF {
175176
vecOfVecOfTuples.push_back(innerVector);
176177
innerVector.clear();
177178
df++;
178-
LOGF(info, "collisions: df = %i", df);
179+
if (isLoggingEnabled)
180+
LOGF(info, "collisions: df = %i", df);
179181
if (df < nCollisions)
180182
return;
181183
df = 0;

0 commit comments

Comments
 (0)