]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSRawDecoder.h
Updated histogram limits (PHOS energy)
[u/mrichter/AliRoot.git] / PHOS / AliPHOSRawDecoder.h
index 22e51510bd2cfc2a490c0fcb21702bd30a98d343..8cadedb33a85df39a41ed58e90253c8cd81c3e25 100644 (file)
@@ -9,35 +9,39 @@
 // (amplitude,time, position,gain) from the raw stream 
 // provided by AliRawReader. See cxx source for use case.
 
-#include "AliRawReader.h"
 #include "AliCaloRawStream.h"
 
 class TArrayI;
-class AliPHOSPulseGenerator;
+class AliRawReader;
+class AliPHOSCalibData ;
 
 class AliPHOSRawDecoder {
 
 public:
 
   AliPHOSRawDecoder();
-  AliPHOSRawDecoder(AliRawReader* rawReader);
+  AliPHOSRawDecoder(AliRawReader* rawReader, AliAltroMapping **mapping = NULL);
   AliPHOSRawDecoder(const AliPHOSRawDecoder& rawDecoder);
   AliPHOSRawDecoder& operator = (const AliPHOSRawDecoder& rawDecoder);
   virtual ~AliPHOSRawDecoder();
 
   virtual Bool_t NextDigit();
 
-  void SetOldRCUFormat(Bool_t isOldRCU) {fCaloStream->SetOldRCUFormat(isOldRCU);}
   void SubtractPedestals(Bool_t subtract) {fPedSubtract=subtract;}
+  void SetAmpOffset(Int_t extPed=5){fAmpOffset=extPed ;}
 
-  Double_t GetEnergy() { return fEnergy; }
-  Double_t GetTime() { return fTime; }
-  Int_t GetModule() { return fModule; }
-  Int_t GetColumn() { return fColumn; }
-  Int_t GetRow() { return fRow; }
-  Bool_t IsLowGain() { return fLowGainFlag; }
+  const Double_t GetEnergy() const { return fEnergy; }
+  const Double_t GetTime() const { return fTime; }
+  const Double_t GetSampleQuality() const {return fQuality ;}
+  const Double_t GetPedestalRMS() const {return fPedestalRMS ;}
+  const Int_t GetModule() const { return fModule; }
+  const Int_t GetColumn() const { return fColumn; }
+  const Int_t GetRow() const { return fRow; }
+  const Bool_t IsLowGain() const { return fLowGainFlag; }
+  const Bool_t IsOverflow() const { return fOverflow ;}
 
   const AliRawReader* GetRawReader() const { return fRawReader; }
+  void SetCalibData(AliPHOSCalibData * cdata){ fCalibData=cdata ;}
 
 protected:   
   
@@ -45,18 +49,29 @@ protected:
   AliCaloRawStream* fCaloStream; // PHOS/EMCAL raw data stream
   Bool_t fPedSubtract;           // pedestals subtraction (kTRUE="yes")
 
-private:
 
   Double_t fEnergy; // "digit" energy
   Double_t fTime;   // "digit" time
+  Double_t fQuality ; //Sample quality
+  Double_t fPedestalRMS; //calciulated RMS of pedestal (non-ZS runs)
+  Int_t fAmpOffset ; //Pedestal offset from ALTRO chips
   Int_t fModule;    // PHOS module number (1-5)
   Int_t fColumn;    // column in the module
   Int_t fRow;       // row
-  Bool_t fLowGainFlag;
-  TArrayI* fSamples;// array of samples
-  AliPHOSPulseGenerator* fPulseGenerator; // ALTRO pulse simulator
-  
-  ClassDef(AliPHOSRawDecoder,1)
+  Int_t fNewModule;    // PHOS module number (1-5) of keeped sample
+  Int_t fNewColumn;    // column in the module  of keeped sample
+  Int_t fNewRow;       // row  of keeped sample
+  Int_t fNewAmp ;      //Keeped amp
+  Int_t fNewTime ;     //Time of keeped sample
+  Bool_t fLowGainFlag; //True if sample read from Low Gain
+  Bool_t fNewLowGainFlag; // fLowGainFlag of keeped sample
+  Bool_t fOverflow ;   //Wether there was overflow
+  TArrayI* fSamples;   // array of samples
+  TArrayI* fTimes ;    // array of times corresponding to samples
+  AliPHOSCalibData * fCalibData ;   //! Calibration database if avalable
+
+
+  ClassDef(AliPHOSRawDecoder,2)
 };
 
 #endif