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 */
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.
12 #include "AliCaloRawStream.h"
17 class AliPHOSRawDecoder {
22 AliPHOSRawDecoder(AliRawReader* rawReader, AliAltroMapping **mapping = NULL);
23 AliPHOSRawDecoder(const AliPHOSRawDecoder& rawDecoder);
24 AliPHOSRawDecoder& operator = (const AliPHOSRawDecoder& rawDecoder);
25 virtual ~AliPHOSRawDecoder();
27 virtual Bool_t NextDigit();
29 void SubtractPedestals(Bool_t subtract) {fPedSubtract=subtract;}
31 const Double_t GetEnergy() const { return fEnergy; }
32 const Double_t GetTime() const { return fTime; }
33 const Double_t GetSampleQuality() const {return fQuality ;}
34 const Int_t GetModule() const { return fModule; }
35 const Int_t GetColumn() const { return fColumn; }
36 const Int_t GetRow() const { return fRow; }
37 const Bool_t IsLowGain() const { return fLowGainFlag; }
38 const Bool_t IsOverflow() const { return fOverflow ;}
40 const AliRawReader* GetRawReader() const { return fRawReader; }
44 AliRawReader* fRawReader; // raw data reader
45 AliCaloRawStream* fCaloStream; // PHOS/EMCAL raw data stream
46 Bool_t fPedSubtract; // pedestals subtraction (kTRUE="yes")
49 Double_t fEnergy; // "digit" energy
50 Double_t fTime; // "digit" time
51 Double_t fQuality ; //Sample quality
52 Int_t fModule; // PHOS module number (1-5)
53 Int_t fColumn; // column in the module
55 Int_t fNewModule; // PHOS module number (1-5) of keeped sample
56 Int_t fNewColumn; // column in the module of keeped sample
57 Int_t fNewRow; // row of keeped sample
58 Int_t fNewAmp ; //Keeped amp
59 Int_t fNewTime ; //Time of keeped sample
60 Bool_t fLowGainFlag; //True if sample read from Low Gain
61 Bool_t fNewLowGainFlag; // fLowGainFlag of keeped sample
62 Bool_t fOverflow ; //Wether there was overflow
63 TArrayI* fSamples; // array of samples
64 TArrayI* fTimes ; // array of times corresponding to samples
66 ClassDef(AliPHOSRawDecoder,1)