Skip to content

Commit c477bd7

Browse files
committed
fixes + zorro getter for number of tois
1 parent 7c59b4f commit c477bd7

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

EventFiltering/Zorro.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ class Zorro
5454
std::vector<int> getTOIcounters() const { return mTOIcounts; }
5555
std::vector<bool> getTriggerOfInterestResults(uint64_t bcGlobalId, uint64_t tolerance = 100);
5656
std::vector<bool> getTriggerOfInterestResults() const;
57+
int getNTOIs() const { return mTOIs.size(); }
5758

5859
void setCCDBpath(std::string path) { mBaseCCDBPath = path; }
5960
void setBaseCCDBPath(std::string path) { mBaseCCDBPath = path; }

PWGLF/Tasks/Strangeness/nonPromptCascade.cxx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,15 +296,18 @@ struct NonPromptCascadeTask {
296296
auto bc = coll.template bc_as<aod::BCsWithTimestamps>();
297297
if (runNumber != bc.runNumber()) {
298298
mZorro.initCCDB(mCCDB.service, bc.runNumber(), bc.timestamp(), cfgTriggersOfInterest.value);
299+
if(mZorro.getNTOIs() > 32) {
300+
LOG(fatal) << "N TOIs:" << mZorro.getNTOIs() << " Max 32 TOIs possible.";
301+
}
299302
mZorro.populateHistRegistry(mRegistry, bc.runNumber());
300303
runNumber = bc.runNumber();
301304
}
302305
bool sel = mZorro.isSelected(bc.globalBC()); /// Just let Zorro do the accounting
303306
if (sel) {
304307
std::vector<bool> toivect = mZorro.getTriggerOfInterestResults();
305308
uint32_t toiMask = 0;
306-
for (uint i = 0; i < toivect.size(); i++) {
307-
toiMask += 1 << i;
309+
for (int i{0}; i < toivect.size(); i++) {
310+
toiMask += toivect[i] << i;
308311
}
309312
toiMap[bc.globalBC()] = toiMask;
310313
}

0 commit comments

Comments
 (0)