Possibility to set offset in SZ runs
[u/mrichter/AliRoot.git] / PHOS / AliPHOSRawDecoder.h
CommitLineData
a29c28b6 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
7bc140a5 6/* $Id$ */
7
a29c28b6 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
a29c28b6 12#include "AliCaloRawStream.h"
13
b1a8a9cb 14class TArrayI;
c5d477f8 15class AliRawReader;
b1a8a9cb 16
a29c28b6 17class AliPHOSRawDecoder {
18
19public:
20
21 AliPHOSRawDecoder();
467957dc 22 AliPHOSRawDecoder(AliRawReader* rawReader, AliAltroMapping **mapping = NULL);
a29c28b6 23 AliPHOSRawDecoder(const AliPHOSRawDecoder& rawDecoder);
24 AliPHOSRawDecoder& operator = (const AliPHOSRawDecoder& rawDecoder);
25 virtual ~AliPHOSRawDecoder();
26
27 virtual Bool_t NextDigit();
28
a29c28b6 29 void SubtractPedestals(Bool_t subtract) {fPedSubtract=subtract;}
60144e5f 30 void SetAmpOffset(Int_t extPed=5){fAmpOffset=extPed ;}
a29c28b6 31
c5d477f8 32 const Double_t GetEnergy() const { return fEnergy; }
33 const Double_t GetTime() const { return fTime; }
34 const Double_t GetSampleQuality() const {return fQuality ;}
3876e91d 35 const Double_t GetPedestalRMS() const {return fPedestalRMS ;}
c5d477f8 36 const Int_t GetModule() const { return fModule; }
37 const Int_t GetColumn() const { return fColumn; }
38 const Int_t GetRow() const { return fRow; }
39 const Bool_t IsLowGain() const { return fLowGainFlag; }
40 const Bool_t IsOverflow() const { return fOverflow ;}
a29c28b6 41
5e3c77d9 42 const AliRawReader* GetRawReader() const { return fRawReader; }
43
a29c28b6 44protected:
45
7bc140a5 46 AliRawReader* fRawReader; // raw data reader
47 AliCaloRawStream* fCaloStream; // PHOS/EMCAL raw data stream
48 Bool_t fPedSubtract; // pedestals subtraction (kTRUE="yes")
a29c28b6 49
a29c28b6 50
7bc140a5 51 Double_t fEnergy; // "digit" energy
52 Double_t fTime; // "digit" time
70d93620 53 Double_t fQuality ; //Sample quality
3876e91d 54 Double_t fPedestalRMS; //calciulated RMS of pedestal (non-ZS runs)
60144e5f 55 Int_t fAmpOffset ; //Pedestal offset from ALTRO chips
7bc140a5 56 Int_t fModule; // PHOS module number (1-5)
57 Int_t fColumn; // column in the module
58 Int_t fRow; // row
39569d36 59 Int_t fNewModule; // PHOS module number (1-5) of keeped sample
60 Int_t fNewColumn; // column in the module of keeped sample
61 Int_t fNewRow; // row of keeped sample
62 Int_t fNewAmp ; //Keeped amp
63 Int_t fNewTime ; //Time of keeped sample
c5d477f8 64 Bool_t fLowGainFlag; //True if sample read from Low Gain
65 Bool_t fNewLowGainFlag; // fLowGainFlag of keeped sample
14100b90 66 Bool_t fOverflow ; //Wether there was overflow
67 TArrayI* fSamples; // array of samples
68 TArrayI* fTimes ; // array of times corresponding to samples
69
a29c28b6 70 ClassDef(AliPHOSRawDecoder,1)
71};
72
73#endif