]>
Commit | Line | Data |
---|---|---|
e1aec4f9 | 1 | #ifndef ALIPHOSTRURAWREADER_H |
2 | #define ALIPHOSTRURAWREADER_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | /* $Id$ */ | |
6 | ||
7 | ||
8 | class AliCaloRawStreamV3; | |
9 | ||
10 | #include "TObject.h" | |
11 | ||
12 | /* | |
13 | * Class for reading TRU data from a bunch from a raw datastream. | |
14 | * Author: Henrik Qvigstad <henrik.qvigstad@cern.ch> | |
15 | */ | |
16 | class AliPHOSTRURawReader : public TObject | |
17 | { | |
18 | public: | |
19 | AliPHOSTRURawReader(); | |
20 | virtual ~AliPHOSTRURawReader(); | |
21 | ||
22 | Short_t GetTriggerSignal(Int_t xIdx, Int_t zIdx, Int_t timeBin) const {return fSignals[xIdx][zIdx][timeBin];} | |
23 | Bool_t GetTriggerFlag(Int_t xIdx, Int_t zIdx, Int_t timeBin) const {return fFlags[xIdx][zIdx][timeBin];} | |
24 | bool IsActive() {return fActive;} | |
25 | bool IsActive(Int_t timeBin) {return fActiveTime[timeBin];} | |
e19e9fb1 | 26 | bool HasSignal() {return fHasSignal;} |
27 | bool HasSignal(Int_t timeBin) {return fHasSignalTime[timeBin];} | |
e1aec4f9 | 28 | |
29 | void ReadFromStream(AliCaloRawStreamV3* ); | |
30 | void Reset(); | |
31 | ||
32 | private: | |
33 | AliPHOSTRURawReader(const AliPHOSTRURawReader &); // not implemented | |
34 | AliPHOSTRURawReader& operator= (const AliPHOSTRURawReader &); // not implemented | |
35 | ||
36 | public: | |
37 | const static Int_t kDefaultSignalValue = 512; // Default/Ideal TRU amplitude pedestal | |
38 | ||
39 | private: | |
40 | // constants | |
41 | const static Int_t kNTimeBins = 128; // Number of timeBins | |
42 | const static Int_t kN2x2XPrTRURow = 8; // (=64/2/4) Number of 2x2 pr. row | |
43 | const static Int_t kN2x2ZPrBranch = 14; // (=56/2/2) Number of 2x2 pr. branch | |
44 | const static Int_t kN4x4XPrTRURow = 7; // (=64/2/4 -1) Number of 4x4 pr. row | |
45 | const static Int_t kN4x4ZPrBranch = 13; // (=56/2/2) -1 Number of 4x4 pr. branch | |
46 | ||
47 | Short_t fSignals[kN2x2XPrTRURow][kN2x2ZPrBranch][kNTimeBins]; // 2x2 Trigger Signal Sum, [x][z][t] | |
48 | Bool_t fFlags[kN4x4XPrTRURow][kN4x4ZPrBranch][kNTimeBins]; // 4x4 Trigger Flag, [x][z][t] | |
49 | ||
50 | Bool_t fActive; // Active | |
e19e9fb1 | 51 | Bool_t fHasSignal; // Has Signal |
e1aec4f9 | 52 | Bool_t fActiveTime[kNTimeBins]; // Active [t] |
e19e9fb1 | 53 | Bool_t fHasSignalTime[kNTimeBins]; // Has Signal [t] |
e1aec4f9 | 54 | |
e19e9fb1 | 55 | ClassDef(AliPHOSTRURawReader, 1) |
e1aec4f9 | 56 | }; |
57 | ||
58 | #endif // ALIPHOSTRURAWREADER_H |