Severe bugfix in Memory2CompMemory. Actually this bug was introduced by
authorvestbo <vestbo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 8 Nov 2002 16:02:33 +0000 (16:02 +0000)
committervestbo <vestbo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 8 Nov 2002 16:02:33 +0000 (16:02 +0000)
myself some weeks ago, but for some strange reason did not cause any
crashes until now. The problem was checking for ADC saturation, which uses
AliL3Transform::GetADCSat(), but this is sometimes set to 1024 and this
of course is a problem since we are only reserving 10 bits per ADC when
writing to binary files. I actually spend 2 hours figuring out this
FUCKING bug.

HLT/src/AliL3MemHandler.cxx

index 3b94bd9aa50c3f9f5a85f9ae405a22dad81eb491..4f9aea8ad66937345122caf61dbaadd6cd4da087 100644 (file)
@@ -651,8 +651,8 @@ Int_t AliL3MemHandler::Memory2CompMemory(UInt_t nrow,
       }
       while(digit<row_pt->fNDigit && row_pt->fDigitData[digit].fPad == pad){
         UShort_t charge = row_pt->fDigitData[digit].fCharge;
       }
       while(digit<row_pt->fNDigit && row_pt->fDigitData[digit].fPad == pad){
         UShort_t charge = row_pt->fDigitData[digit].fCharge;
-        if(charge>=AliL3Transform::GetADCSat()){
-          charge=AliL3Transform::GetADCSat();
+        if(charge>=1023){
+          charge=1023;
         }
         Write(comp,index,subindex,charge);
         if(digit+1<row_pt->fNDigit&&row_pt->fDigitData[digit+1].fPad == pad){
         }
         Write(comp,index,subindex,charge);
         if(digit+1<row_pt->fNDigit&&row_pt->fDigitData[digit+1].fPad == pad){
@@ -669,7 +669,7 @@ Int_t AliL3MemHandler::Memory2CompMemory(UInt_t nrow,
       Write(comp,index,subindex,0);
       Write(comp,index,subindex,0);
     }
       Write(comp,index,subindex,0);
       Write(comp,index,subindex,0);
     }
-
+    
     Int_t size = sizeof(AliL3DigitData) * row_pt->fNDigit+
                                             sizeof(AliL3DigitRowData);
     Byte_t  *byte_pt =(Byte_t *) row_pt;
     Int_t size = sizeof(AliL3DigitData) * row_pt->fNDigit+
                                             sizeof(AliL3DigitRowData);
     Byte_t  *byte_pt =(Byte_t *) row_pt;