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