]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSRawDecoder.h
All time calibration moved to AliPHOSRawDigiProducer
[u/mrichter/AliRoot.git] / PHOS / AliPHOSRawDecoder.h
1 #ifndef ALIPHOSRAWDECODER_H
2 #define ALIPHOSRAWDECODER_H
3 /* Copyright(c) 2007, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                          */
5
6 /* $Id$ */
7
8 // This class extracts the PHOS "digits" of current event
9 // (amplitude,time, position,gain) from the raw stream 
10 // provided by AliRawReader. See cxx source for use case.
11
12 #include "AliRawReader.h"
13 #include "AliCaloRawStream.h"
14
15 class TArrayI;
16
17 class AliPHOSRawDecoder {
18
19 public:
20
21   AliPHOSRawDecoder();
22   AliPHOSRawDecoder(AliRawReader* rawReader, AliAltroMapping **mapping = NULL);
23   AliPHOSRawDecoder(const AliPHOSRawDecoder& rawDecoder);
24   AliPHOSRawDecoder& operator = (const AliPHOSRawDecoder& rawDecoder);
25   virtual ~AliPHOSRawDecoder();
26
27   virtual Bool_t NextDigit();
28
29   void SetOldRCUFormat(Bool_t isOldRCU) {fCaloStream->SetOldRCUFormat(isOldRCU);}
30   void SubtractPedestals(Bool_t subtract) {fPedSubtract=subtract;}
31
32   Double_t GetEnergy() { return fEnergy; }
33   Double_t GetTime() { return fTime; }
34   Double_t GetSampleQuality(){return fQuality ;}
35   Int_t GetModule() { return fModule; }
36   Int_t GetColumn() { return fColumn; }
37   Int_t GetRow() { return fRow; }
38   Bool_t IsLowGain() { return fLowGainFlag; }
39   Bool_t IsOverflow(){ return fOverflow ;}
40
41   const AliRawReader* GetRawReader() const { return fRawReader; }
42
43 protected:   
44   
45   AliRawReader* fRawReader;      // raw data reader
46   AliCaloRawStream* fCaloStream; // PHOS/EMCAL raw data stream
47   Bool_t fPedSubtract;           // pedestals subtraction (kTRUE="yes")
48
49
50   Double_t fEnergy; // "digit" energy
51   Double_t fTime;   // "digit" time
52   Double_t fQuality ; //Sample quality
53   Int_t fModule;    // PHOS module number (1-5)
54   Int_t fColumn;    // column in the module
55   Int_t fRow;       // row
56   Int_t fNewModule;    // PHOS module number (1-5) of keeped sample
57   Int_t fNewColumn;    // column in the module  of keeped sample
58   Int_t fNewRow;       // row  of keeped sample
59   Int_t fNewAmp ;      //Keeped amp
60   Int_t fNewTime ;     //Time of keeped sample
61   Bool_t fLowGainFlag;
62   Bool_t fNewLowGainFlag;
63   Bool_t fOverflow ;   //Wether there was overflow
64   TArrayI* fSamples;   // array of samples
65   TArrayI* fTimes ;    // array of times corresponding to samples
66
67   ClassDef(AliPHOSRawDecoder,1)
68 };
69
70 #endif