Skip to content

Commit 4ee378d

Browse files
committed
Make PV reader verbosity levels more selective
1 parent 1731e70 commit 4ee378d

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

Detectors/GlobalTrackingWorkflow/readers/src/PrimaryVertexReaderSpec.cxx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,17 +116,21 @@ void PrimaryVertexReader::run(ProcessingContext& pc)
116116
nambig++;
117117
}
118118
}
119-
LOGP(info, "{} : total attached: {}, contributors: {}, ambiguous: {}", GIndex::getSourceName(is), mPV2MatchIdxRef[cnt].getEntriesOfSource(is), ncontrib, nambig);
119+
if (mPV2MatchIdxRef[cnt].getEntriesOfSource(is)) {
120+
LOGP(info, "{} : total attached: {}, contributors: {}, ambiguous: {}", GIndex::getSourceName(is), mPV2MatchIdxRef[cnt].getEntriesOfSource(is), ncontrib, nambig);
121+
}
120122
if (mVerbose < 2) {
121123
continue;
122124
}
123125
std::string trIDs;
124126
int cntT = 0;
125127
for (int i = idMin; i < idMax; i++) {
126-
trIDs += mPV2MatchIdx[i].asString() + " ";
127-
if (!((++cntT) % 15)) {
128-
LOG(info) << trIDs;
129-
trIDs = "";
128+
if (mVerbose > 2 || mPV2MatchIdx[i].isPVContributor()) {
129+
trIDs += mPV2MatchIdx[i].asString() + " ";
130+
if (!((++cntT) % 15)) {
131+
LOG(info) << trIDs;
132+
trIDs = "";
133+
}
130134
}
131135
}
132136
if (!trIDs.empty()) {
@@ -185,7 +189,7 @@ DataProcessorSpec getPrimaryVertexReaderSpec(bool useMC)
185189
{"primary-vertex-infile", VariantType::String, "o2_primary_vertex.root", {"Name of the input primary vertex file"}},
186190
{"vertex-track-matches-infile", VariantType::String, "o2_pvertex_track_matches.root", {"Name of the input file with primary vertex - tracks matches"}},
187191
{"input-dir", VariantType::String, "none", {"Input directory"}},
188-
{"vertex-verbosity", VariantType::Int, 0, {"Print vertex/tracks info: 1) number of contributor and attached, 2) full dump"}}}};
192+
{"vertex-verbosity", VariantType::Int, 0, {"Print vertex/tracks info: 1) number of contributor and attached, 2) dump contributors 3) full dump"}}}};
189193
}
190194

191195
} // namespace vertexing

0 commit comments

Comments
 (0)