Unused DAs removed.
[u/mrichter/AliRoot.git] / PHOS / AliPHOSCalibHistoProducer.cxx
index 74d54f0..5c2a2b0 100644 (file)
 #include "TH2F.h"
 #include "TFile.h"
 #include "AliPHOSRawDecoder.h"
+#include "AliRawReader.h"
 
 ClassImp(AliPHOSCalibHistoProducer)
 
 //-----------------------------------------------------------------------------
 AliPHOSCalibHistoProducer::AliPHOSCalibHistoProducer() : 
-  fRawDecoder(0),fHistoFile(0),fUpdatingRate(100),fIsOldRCUFormat(kFALSE),
+  fRawDecoder(0),fHistoFile(0),fUpdatingRate(100),
   fEvents(0),fNbins(100),fXlow(0.),fXup(1000.)
 {
   // Constructor: initializes data members
@@ -62,7 +63,7 @@ AliPHOSCalibHistoProducer::AliPHOSCalibHistoProducer() :
 
 //-----------------------------------------------------------------------------            
 AliPHOSCalibHistoProducer::AliPHOSCalibHistoProducer(Int_t nbinsx, Double_t xlow, Double_t xup) :
-  fRawDecoder(0),fHistoFile(0),fUpdatingRate(100),fIsOldRCUFormat(kFALSE),
+  fRawDecoder(0),fHistoFile(0),fUpdatingRate(100),
   fEvents(0),fNbins(nbinsx),fXlow(xlow),fXup(xup)
 {
   // Constructor: initializes data members.
@@ -100,7 +101,7 @@ AliPHOSCalibHistoProducer::~AliPHOSCalibHistoProducer()
 //-----------------------------------------------------------------------------
 AliPHOSCalibHistoProducer::AliPHOSCalibHistoProducer(const AliPHOSCalibHistoProducer &histoproducer) :
   TObject(histoproducer),fRawDecoder(histoproducer.fRawDecoder),fHistoFile(histoproducer.fHistoFile),
-  fUpdatingRate(histoproducer.fUpdatingRate),fIsOldRCUFormat(histoproducer.fIsOldRCUFormat),
+  fUpdatingRate(histoproducer.fUpdatingRate),
   fEvents(histoproducer.fEvents),fNbins(histoproducer.fNbins),fXlow(histoproducer.fXlow),fXup(histoproducer.fXup)
 {
   //Copy constructor.
@@ -131,7 +132,6 @@ AliPHOSCalibHistoProducer& AliPHOSCalibHistoProducer::operator=
     fRawDecoder = histoproducer.fRawDecoder;
     fHistoFile = histoproducer.fHistoFile;
     fUpdatingRate = histoproducer.fUpdatingRate;
-    fIsOldRCUFormat = histoproducer.fIsOldRCUFormat;
     fEvents = histoproducer.fEvents;
     fEvents = histoproducer.fEvents;
     fNbins = histoproducer.fNbins;
@@ -167,9 +167,6 @@ void AliPHOSCalibHistoProducer::Run()
   Double_t energy;
   Int_t mod,col,row;
   
-  if(fIsOldRCUFormat)
-    fRawDecoder->SetOldRCUFormat(kTRUE);
-
   while(fRawDecoder->NextDigit()) {
     
     if(fRawDecoder->IsLowGain()) continue; 
@@ -189,9 +186,9 @@ void AliPHOSCalibHistoProducer::Run()
       fAmpHisto[mod][col][row] = new TH1F(hname,hname,fNbins,fXlow,fXup);
       fAmpHisto[mod][col][row]->Fill(energy);
     }
-    
+  }
     // update histograms in local file every 100th event
-    if(fEvents%fUpdatingRate == 0) {
+    if(fEvents != 0 && fEvents%fUpdatingRate == 0) {
       AliInfo(Form("Updating histo file, event %d, run %d\n",
                   fEvents,fRawDecoder->GetRawReader()->GetRunNumber()));
       UpdateHistoFile();
@@ -199,7 +196,6 @@ void AliPHOSCalibHistoProducer::Run()
     
     //   UpdateHistoFile();
     //   AliInfo(Form("%d events of run %d processed.",iEvent,runNum));
-  }
   
   fEvents++;