Write only one set of raw data: either low gain or high gain
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 28 Aug 2004 07:17:01 +0000 (07:17 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 28 Aug 2004 07:17:01 +0000 (07:17 +0000)
PHOS/AliPHOS.cxx

index 9eff25a..93879f5 100644 (file)
@@ -483,12 +483,15 @@ void AliPHOS::Digits2Raw()
       else 
        energy = digit->GetAmp() * digitizer->GetCPVchannel() + digitizer->GetCPVpedestal() ;
         
-      RawSampledResponse(digit->GetTimeR(), energy, adcValuesHigh, adcValuesLow) ; 
+      Bool_t lowgain = RawSampledResponse(digit->GetTimeR(), energy, adcValuesHigh, adcValuesLow) ; 
       
-      buffer->WriteChannel(relId[3], relId[2], module, 
-                          GetRawFormatTimeBins(), adcValuesHigh, kThreshold);
-      buffer->WriteChannel(relId[3], relId[2], module + fLowGainOffset, 
+     if (lowgain) 
+       buffer->WriteChannel(relId[3], relId[2], module + fLowGainOffset, 
                           GetRawFormatTimeBins(), adcValuesLow, kThreshold);
+      else 
+       buffer->WriteChannel(relId[3], relId[2], module, 
+                            GetRawFormatTimeBins(), adcValuesHigh, kThreshold);
+      
     }
   }