Restrict amount of trigger bits to size of int
authormfasel <mfasel@lbl.gov>
Mon, 27 Oct 2014 17:52:08 +0000 (18:52 +0100)
committermfasel <mfasel@lbl.gov>
Tue, 28 Oct 2014 12:37:51 +0000 (13:37 +0100)
PWG/EMCAL/AliEmcalTriggerMaker.cxx

index 4e6e371..ad103c2 100644 (file)
@@ -355,7 +355,7 @@ AliEmcalTriggerPatchInfo* AliEmcalTriggerMaker::ProcessPatch(TriggerMakerTrigger
   Int_t nBitsFound = 0;
   Int_t bitsFound[64];
   if(fDoQA){
-    for(int ibit = 0; ibit < 64; ibit++) {
+    for(int ibit = 0; ibit < sizeof(tBits)*8; ibit++) {
       if(tBits & (1 << ibit)){
         bitsFound[nBitsFound++] = ibit;
         fQAHistos->FillTH1("triggerBitsAll", ibit);