Skip to content

Commit fa88a10

Browse files
authored
Change timestamp offset type from uint64_t to int
1 parent ff896f6 commit fa88a10

1 file changed

Lines changed: 26 additions & 15 deletions

File tree

‎Common/Tasks/zdcTableReader.cxx‎

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ struct ZDCLIAnalysis {
4343
Configurable<bool> selectOnlyB{"selectOnlyB", 0, "Select BC with A && C"};
4444
Configurable<bool> selectColl{"selectColl", 0, "Select ALICE collision events"};
4545
//
46-
Configurable<uint64_t> tStampOffset{"tStampOffset", 0, "offset value for timestamp"};
46+
Configurable<int> tStampOffset{"tStampOffset", 0, "offset value for timestamp"};
4747
Configurable<int> nBinstStamp{"nBinstStamp", 1000, "no. bins in histo vs. timestamp"};
4848
Configurable<float> tStampMax{"tStampMax", 1000, ", maximum value for timestamp"};
4949
//
@@ -232,14 +232,18 @@ struct ZDCLIAnalysis {
232232
}
233233

234234
if (tdcCut) { // TDC cuts applied
235-
if ((tdczna < tdcZNmincut) || (tdczna > tdcZNmaxcut))
235+
if ((tdczna < tdcZNmincut) || (tdczna > tdcZNmaxcut)) {
236236
isZNAtdc = false;
237-
if ((tdcznc < tdcZNmincut) || (tdcznc > tdcZNmaxcut))
237+
}
238+
if ((tdcznc < tdcZNmincut) || (tdcznc > tdcZNmaxcut)) {
238239
isZNCtdc = false;
239-
if ((tdczpa < tdcZPmincut) || (tdczpa > tdcZPmaxcut))
240+
}
241+
if ((tdczpa < tdcZPmincut) || (tdczpa > tdcZPmaxcut)) {
240242
isZPAtdc = false;
241-
if ((tdczpc < tdcZPmincut) || (tdczpc > tdcZPmaxcut))
243+
}
244+
if ((tdczpc < tdcZPmincut) || (tdczpc > tdcZPmaxcut)) {
242245
isZPCtdc = false;
246+
}
243247
}
244248

245249
bool eventSelected = false;
@@ -250,34 +254,41 @@ struct ZDCLIAnalysis {
250254

251255
registry.get<TH1>(HIST("hBCmask"))->Fill(0., 1.);
252256
auto isB = CHECK_BIT(bcMask, 0);
253-
if (isB)
257+
if (isB) {
254258
registry.get<TH1>(HIST("hBCmask"))->Fill(1., 1.);
255-
if (CHECK_BIT(bcMask, 1))
259+
}
260+
if (CHECK_BIT(bcMask, 1)) {
256261
registry.get<TH1>(HIST("hBCmask"))->Fill(2., 1.);
257-
if (CHECK_BIT(bcMask, 2))
262+
}
263+
if (CHECK_BIT(bcMask, 2)) {
258264
registry.get<TH1>(HIST("hBCmask"))->Fill(3., 1.);
259-
if (CHECK_BIT(bcMask, 3))
265+
}
266+
if (CHECK_BIT(bcMask, 3)) {
260267
registry.get<TH1>(HIST("hBCmask"))->Fill(4., 1.);
268+
}
261269
//
262-
if (selectOnlyB && isB)
270+
if (selectOnlyB && isB) {
263271
eventSelected = true;
264-
else if (!selectOnlyB)
272+
} else if (!selectOnlyB) {
265273
eventSelected = true;
274+
}
266275
}
267276

268277
// for collision events -------
269278
if (selectColl) {
270279
bool zvtxSel = false;
271-
if (selectZvtx && CHECK_BIT(selectionBits, 0))
280+
if (selectZvtx && CHECK_BIT(selectionBits, 0)) {
272281
zvtxSel = true;
273-
else if (!selectZvtx)
282+
} else if (!selectZvtx) {
274283
zvtxSel = true;
284+
}
275285
//
276286
bool ottoSel = false;
277-
if (sel8 && CHECK_BIT(selectionBits, 1))
287+
if (sel8 && CHECK_BIT(selectionBits, 1)) {
278288
ottoSel = true;
279-
else if (!sel8)
289+
} else if (!sel8) {
280290
ottoSel = true;
291+
}
281292
//
282293
bool isdoOccupancySel = false;
283294
if (doOccupancySel && CHECK_BIT(selectionBits, 2))

0 commit comments

Comments
 (0)