Skip to content

Commit f4b2efd

Browse files
authored
[DPG] Added check for lastRun in processRun2 (#8757)
1 parent d6321eb commit f4b2efd

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

DPG/Tasks/AOTEvent/eventSelectionQa.cxx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ struct EventSelectionQaTask {
5353

5454
Service<o2::ccdb::BasicCCDBManager> ccdb;
5555
HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject};
56-
bool* applySelection = NULL;
56+
5757
static const int32_t nBCsPerOrbit = o2::constants::lhc::LHCMaxBunches;
5858
int32_t lastRun = -1;
5959
int64_t nOrbits = 1; // number of orbits, setting 1 for unanchored MC
@@ -336,14 +336,17 @@ struct EventSelectionQaTask {
336336
aod::FDDs const&)
337337
{
338338
bool isINT1period = 0;
339-
if (!applySelection) {
339+
340+
int run = bcs.iteratorAt(0).runNumber();
341+
if (run != lastRun) {
342+
lastRun = run;
340343
auto firstBC = bcs.iteratorAt(0);
341344
EventSelectionParams* par = ccdb->getForTimeStamp<EventSelectionParams>("EventSelection/EventSelectionParams", firstBC.timestamp());
342-
applySelection = par->GetSelection(0);
345+
bool* applySelection = par->GetSelection(0);
343346
for (int i = 0; i < kNsel; i++) {
344347
histos.get<TH1>(HIST("hSelMask"))->SetBinContent(i + 1, applySelection[i]);
345348
}
346-
isINT1period = firstBC.runNumber() <= 136377 || (firstBC.runNumber() >= 144871 && firstBC.runNumber() <= 159582);
349+
isINT1period = run <= 136377 || (run >= 144871 && run <= 159582);
347350
}
348351

349352
// bc-based event selection qa

0 commit comments

Comments
 (0)