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 "AliRawReader.h"
13 #include "AliCaloRawStream.h"
16 class AliPHOSPulseGenerator;
18 class AliPHOSRawDecoder {
23 AliPHOSRawDecoder(AliRawReader* rawReader);
24 AliPHOSRawDecoder(const AliPHOSRawDecoder& rawDecoder);
25 AliPHOSRawDecoder& operator = (const AliPHOSRawDecoder& rawDecoder);
26 virtual ~AliPHOSRawDecoder();
28 virtual Bool_t NextDigit();
30 void SetOldRCUFormat(Bool_t isOldRCU) {fCaloStream->SetOldRCUFormat(isOldRCU);}
31 void SubtractPedestals(Bool_t subtract) {fPedSubtract=subtract;}
33 Double_t GetEnergy() { return fEnergy; }
34 Double_t GetTime() { return fTime; }
35 Int_t GetModule() { return fModule; }
36 Int_t GetColumn() { return fColumn; }
37 Int_t GetRow() { return fRow; }
38 Bool_t IsLowGain() { return fLowGainFlag; }
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")
50 Double_t fEnergy; // "digit" energy
51 Double_t fTime; // "digit" time
52 Int_t fModule; // PHOS module number (1-5)
53 Int_t fColumn; // column in the module
56 TArrayI* fSamples;// array of samples
57 AliPHOSPulseGenerator* fPulseGenerator; // ALTRO pulse simulator
59 ClassDef(AliPHOSRawDecoder,1)