]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSRawDigiProducer.cxx
reset DDL data buffers in case of decoding errors detected within the DDL payload
[u/mrichter/AliRoot.git] / PHOS / AliPHOSRawDigiProducer.cxx
index f55fc3be902c622a03a155819def912c18413bed..ae906a6bb8eb9a07aa597edbecfeafee0fc28892 100644 (file)
@@ -148,9 +148,6 @@ void AliPHOSRawDigiProducer::MakeDigits(TClonesArray *digits, AliPHOSRawFitterv0
 {
   //Makes the job.
   //TClonesArray *digits and raw data fitter should be provided by calling function.
-printf("Make Digits! \n") ;
-
-  fitter->SetAmpOffset(4) ;
 
   digits->Clear();
  
@@ -200,17 +197,14 @@ printf("Make Digits! \n") ;
       
       fGeom->RelToAbsNumbering(relId, absId);
       
-      Int_t nBunches = 0;
-      while (fRawStream->NextBunch()) {
-       nBunches++;
-       if (nBunches > 1) continue;
+      fitter->SetNBunches(0);
+      while (fRawStream->NextBunch()) { //Take first in time banch
        const UShort_t *sig = fRawStream->GetSignals();
        Int_t sigStart  = fRawStream->GetStartTimeBin();
        Int_t sigLength = fRawStream->GetBunchLength();
        fitter->Eval(sig,sigStart,sigLength);
       } // End of NextBunch()
 
-      fitter->SetNBunches(nBunches);
       
       Double_t energy = fitter->GetEnergy() ; 
       Double_t time   = fitter->GetTime() ;
@@ -226,7 +220,7 @@ printf("Make Digits! \n") ;
       if(fitter->GetSignalQuality() > fSampleQualityCut && !(fitter->IsOverflow()))
        continue ;
       
-//       energy = CalibrateE(energy,relId,lowGainFlag) ;
+      energy = CalibrateE(energy,relId,!caloFlag) ;
 //       time   = CalibrateT(time,relId,lowGainFlag) ;
 
       //convert time from sample bin units to s