]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSTRURawReader.h
Minor change for LHC11e
[u/mrichter/AliRoot.git] / PHOS / AliPHOSTRURawReader.h
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];}
26   
27   void ReadFromStream(AliCaloRawStreamV3* );
28   void Reset();
29
30  private:
31   AliPHOSTRURawReader(const AliPHOSTRURawReader &); // not implemented
32   AliPHOSTRURawReader& operator= (const AliPHOSTRURawReader &); // not implemented
33   
34  public:
35   const static Int_t kDefaultSignalValue = 512; // Default/Ideal TRU amplitude pedestal
36   
37  private:  
38   // constants
39   const static Int_t kNTimeBins = 128; // Number of timeBins
40   const static Int_t kN2x2XPrTRURow = 8; // (=64/2/4) Number of 2x2 pr. row
41   const static Int_t kN2x2ZPrBranch = 14; // (=56/2/2) Number of 2x2 pr. branch
42   const static Int_t kN4x4XPrTRURow = 7; // (=64/2/4 -1) Number of 4x4 pr. row
43   const static Int_t kN4x4ZPrBranch = 13; // (=56/2/2) -1 Number of 4x4 pr. branch
44   
45   Short_t fSignals[kN2x2XPrTRURow][kN2x2ZPrBranch][kNTimeBins]; // 2x2 Trigger Signal Sum, [x][z][t]
46   Bool_t  fFlags[kN4x4XPrTRURow][kN4x4ZPrBranch][kNTimeBins]; // 4x4 Trigger Flag, [x][z][t]
47   
48   Bool_t fActive; // Active
49   Bool_t fActiveTime[kNTimeBins]; // Active [t]
50   
51   ClassDef(AliPHOSTRURawReader, 0)
52 };
53
54 #endif // ALIPHOSTRURAWREADER_H