]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/PHOSGAINda.cxx
bug fix in GetRefFilePrefix
[u/mrichter/AliRoot.git] / PHOS / PHOSGAINda.cxx
index 45b79b666c8fdf6dd5378fdc25de446022be4d0c..06598d05a10e50742c9d207421735e90d2ed70e9 100644 (file)
@@ -182,7 +182,9 @@ int main(int argc, char **argv) {
          cellX    = stream.GetCellX();
          cellZ    = stream.GetCellZ();
          caloFlag = stream.GetCaloFlag();  // 0=LG, 1=HG, 2=TRU
-
+         
+         if(caloFlag!=0 && caloFlag!=1) continue; //TRU data!
+         
          // In case of oscillating signals with ZS, 
          //a channel can have several bunches.
          
@@ -192,23 +194,24 @@ int main(int argc, char **argv) {
            if (nBunches > 1) continue;
            sigStart  = stream.GetStartTimeBin();
            sigLength = stream.GetBunchLength();
-           fitter.SetSamples(stream.GetSignals(),sigStart,sigLength);
+           fitter.SetChannelGeo(stream.GetModule(),cellX,cellZ,caloFlag);
+           fitter.Eval(stream.GetSignals(),sigStart,sigLength);
          } // End of NextBunch()
          
-         fitter.SetNBunches(nBunches);
-         fitter.SetChannelGeo(stream.GetModule(),cellX,cellZ,caloFlag);
-         fitter.Eval();
-         
          if (nBunches>1) continue;
          
          e[cellX][cellZ][caloFlag] = fitter.GetEnergy();
          t[cellX][cellZ][caloFlag] = fitter.GetTime();
        }
-
+       
+       if(stream.GetModule()<0 || stream.GetModule()>4) continue;
+       
        if(dAs[stream.GetModule()])
          dAs[stream.GetModule()]->FillHistograms(e,t);
-       else
+       else {
          dAs[stream.GetModule()] = new AliPHOSRcuDA1(stream.GetModule(),-1);
+         dAs[stream.GetModule()]->FillHistograms(e,t);
+       }
        
        for(Int_t iX=0; iX<64; iX++) {
          for(Int_t iZ=0; iZ<56; iZ++) {