Bug fix
[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
12#include "AliRawReader.h"
13#include "AliCaloRawStream.h"
14
b1a8a9cb 15class TArrayI;
16class AliPHOSPulseGenerator;
17
a29c28b6 18class AliPHOSRawDecoder {
19
20public:
21
22 AliPHOSRawDecoder();
23 AliPHOSRawDecoder(AliRawReader* rawReader);
24 AliPHOSRawDecoder(const AliPHOSRawDecoder& rawDecoder);
25 AliPHOSRawDecoder& operator = (const AliPHOSRawDecoder& rawDecoder);
26 virtual ~AliPHOSRawDecoder();
27
28 virtual Bool_t NextDigit();
29
30 void SetOldRCUFormat(Bool_t isOldRCU) {fCaloStream->SetOldRCUFormat(isOldRCU);}
31 void SubtractPedestals(Bool_t subtract) {fPedSubtract=subtract;}
32
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 fCaloStream->IsLowGain(); }
39
40protected:
41
7bc140a5 42 AliRawReader* fRawReader; // raw data reader
43 AliCaloRawStream* fCaloStream; // PHOS/EMCAL raw data stream
44 Bool_t fPedSubtract; // pedestals subtraction (kTRUE="yes")
a29c28b6 45
46private:
47
7bc140a5 48 Double_t fEnergy; // "digit" energy
49 Double_t fTime; // "digit" time
50 Int_t fModule; // PHOS module number (1-5)
51 Int_t fColumn; // column in the module
52 Int_t fRow; // row
b1a8a9cb 53 TArrayI* fSamples;// array of samples
54 AliPHOSPulseGenerator* fPulseGenerator; // ALTRO pulse simulator
a29c28b6 55
56 ClassDef(AliPHOSRawDecoder,1)
57};
58
59#endif