correct array index + save LED Ref. output
authordsilverm <dsilverm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 16 Dec 2008 22:31:21 +0000 (22:31 +0000)
committerdsilverm <dsilverm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 16 Dec 2008 22:31:21 +0000 (22:31 +0000)
EMCAL/AliCaloCalibSignal.cxx

index 1af0a47..0840c1b 100644 (file)
@@ -456,8 +456,8 @@ Bool_t AliCaloCalibSignal::ProcessEvent(AliCaloRawStream *in, AliRawEventHeaderB
     for(int j=0; j<fLEDRefs; j++){
       for (gain=0; gain<2; gain++) {
        fRefNum = GetRefNum(i, j, gain); 
-       if (LEDAmpVal[RefNum]) {
-         fAmp = LEDAmpVal[RefNum];
+       if (LEDAmpVal[fRefNum]) {
+         fAmp = LEDAmpVal[fRefNum];
          fTreeLEDAmpVsTime->Fill();//fRefNum,fHour,fAmp);
          fNRef[fRefNum]++;
        }
@@ -484,9 +484,11 @@ Bool_t AliCaloCalibSignal::Save(TString fileName)
 
   // save the trees
   fTreeAmpVsTime->Write();
+  fTreeLEDAmpVsTime->Write();
   if (fUseAverage) { 
     Analyze(); // get the latest and greatest averages
     fTreeAvgAmpVsTime->Write();
+    fTreeLEDAvgAmpVsTime->Write();
   }
 
   destFile.Close();