Skip to content

Commit 1f1e980

Browse files
authored
[PWGUD] Fix type of problemBit variable and cast (#18587)
1 parent 7558e7e commit 1f1e980

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎PWGUD/TableProducer/tauThreeProngEventTableProducer.cxx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1397,7 +1397,7 @@ struct TauThreeProngEventTableProducer {
13971397
float trueDaugZ[6] = {-998., -998., -998., -998., -998., -998.};
13981398
int trueDaugPdgCode[6] = {-999, -999, -999, -999, -999, -999};
13991399

1400-
int8_t problemBits[8] = {-99, -99, -99, -99, -99, -99, -99, -99};
1400+
bool problemBits[8] = {false, false, false, false, false, false, false, false};
14011401
uint8_t problemBitsFlag = 0;
14021402
// MyRecoProblem problem = NO_PROBLEM;
14031403
registrySkim.get<TH1>(HIST("skim/problemMC"))->Fill(NO_PROBLEM);
@@ -1742,10 +1742,10 @@ struct TauThreeProngEventTableProducer {
17421742
} // end of loop over collisions associated to MC collision
17431743

17441744
// set up problem bits
1745-
problemBitsFlag = problemBits[0]; // initialization
1745+
problemBitsFlag = static_cast<uint8_t>(problemBits[0]); // initialization
17461746
for (int ibit = 1; ibit < nBitsMax; ibit++) {
1747-
problemBitsFlag = (problemBitsFlag << offset); // shift by 1 position towards left
1748-
problemBitsFlag += problemBits[ibit]; // add next bit to the pool
1747+
problemBitsFlag = (problemBitsFlag << offset); // shift by 1 position towards left
1748+
problemBitsFlag += static_cast<uint8_t>(problemBits[ibit]); // add next bit to the pool
17491749
}
17501750

17511751
// decide the channel and set the variable.

0 commit comments

Comments
 (0)