AliRoot Core  3dc7879 (3dc7879)
AliEMCALTriggerSTURawStream.h
Go to the documentation of this file.
1 #ifndef ALIEMCALTRIGGERSTURAWSTREAM_H
2 #define ALIEMCALTRIGGERSTURAWSTREAM_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice */
5 
6 //________________________________________________
14 //________________________________________________
15 
16 #ifndef ROOT_TObject
17 # include "TObject.h"
18 #endif
19 
20 class AliRawReader;
21 
22 class AliEMCALTriggerSTURawStream: public TObject
23 {
24 
25 public:
26 
28  AliEMCALTriggerSTURawStream(AliRawReader* rawReader);
30 
31  virtual void SetDetector(int det) { fDetector = static_cast<fDetType>(det) ; }
32  virtual Int_t GetDetector() { return static_cast<Int_t>(fDetector) ; }
33 
34  virtual void Reset();
35  virtual Bool_t ReadPayLoad();
36 
37  virtual void DumpPayLoad(const Option_t *option = "ALL") const;
38 
39  virtual void GetADC( Int_t iTRU, UInt_t ADC[] );
40  virtual void GetPHOSSubregion( UInt_t PHOSSubregion[] );
41  virtual UInt_t GetL1JetThreshold( const int i) const { return fL1JetThreshold [i] ; }
42  virtual UInt_t GetL1GammaThreshold(const int i) const { return fL1GammaThreshold[i] ; }
43 
44  virtual Int_t GetNL0GammaPatch() const { return fNL0GammaPatch ; }
45  virtual Int_t GetNL1GammaPatch( const int i) const { return fNL1GammaPatch[i] ; }
46  virtual Int_t GetNL1JetPatch( const int i) const { return fNL1JetPatch [i] ; }
47 
48  virtual Bool_t GetL0GammaPatch(const Int_t i, Int_t& x, Int_t& y ) const;
49  virtual Bool_t GetL1GammaPatch(const Int_t i, const Int_t j, Int_t& x, Int_t& y, Int_t& z) const;
50  virtual Bool_t GetL1JetPatch( const Int_t i, const Int_t j, Int_t& x, Int_t& y ) const;
51 
52  virtual UInt_t GetV0A() const { return fV0A ; }
53  virtual UInt_t GetV0C() const { return fV0C ; }
54  virtual UInt_t GetG(int i, int j) const { return fG[i][j] ; }//[ABC][high/low]
55  virtual UInt_t GetJ(int i, int j) const { return fJ[i][j] ; }//[ABC][high/low]
56  virtual UInt_t GetPHOSScale(int i) const { return fS[i] ; }
57  virtual UInt_t GetRho() const { return fRho ; }
58  virtual UInt_t GetRegionEnable() const { return fRegionEnable ; }
59  virtual UInt_t GetFrameReceived() const { return fFrameReceived ; }
60  virtual UInt_t GetFwVersion() const { return fFwVersion ; }
61  virtual UInt_t GetPatchSize() const { return fPatchSize ; }
62  virtual Int_t GetRawData() const { return fGetRawData ; }
63  virtual Int_t GetnTRU() const { return (fDetector==kEMCAL)?nTRUEMCAL:(fDetector==kDCAL)?nTRUDCAL:0 ; }
64 
65 private:
66 
69 
70  UShort_t GetThreshold(Short_t a, Short_t b, Short_t c, UShort_t v0A, UShort_t v0C) const;
71 
72  AliRawReader* fRawReader;
73 
74  enum fDetType
75  {
76  kEMCAL = 0,
77  kDCAL = 1
78  };
79 
81  {
82  v0 = 0 ,
83  v0Raw = 1 ,
84  v1 = 2 ,
85  v1Raw = 3 ,
86  v12 = 8 ,
87  v12Raw = 9 ,
88 
89  v2EMCAL = 4 ,
90  v2EMCALRaw = 5 ,
91  v2DCAL = 6 ,
92  v2DCALRaw = 7 ,
93  def = 8
94  };
95 
97  Int_t fGetRawData ;
99 
100  static const Int_t kPayLoadSizeV0 = 236 ;
101  static const Int_t kPayLoadSizeV0Raw = 1536 ;
102  static const Int_t kPayLoadSizeV1 = 245 ;
103  static const Int_t kPayLoadSizeV1Raw = 1536 ;
104  //XXX
105  static const Int_t kPayLoadSizeV12 = 390 ;
106  static const Int_t kPayLoadSizeV12Raw = 1536 ;
107 
108  static const Int_t kPayLoadSizeV2EMCAL = 391 ;
109  static const Int_t kPayLoadSizeV2EMCALRaw = 1536 ;
110  static const Int_t kPayLoadSizeV2DCAL = 197 ;
111  static const Int_t kPayLoadSizeV2DCALRaw = 708 ;
112 
113  static const Int_t maxpayloadSize = 1937 ;
114 
115  static const Int_t maxL0GammaPatchIndex = 3100 ;
116  static const Int_t maxL1Gamma = 2 ;
118  static const Int_t maxL1GammaPatchIndex = 3100 ;
119  static const Int_t maxL1Jet = 2 ;
121  static const Int_t maxL1JetPatchIndex = 200 ;
122 
124  static const Int_t maxnTRU = 32 ;
125  static const Int_t maxnmoduleInTRU = 96 ;
127 
129  static const Int_t nTRUEMCAL = 32 ;
130  static const Int_t nTRUDCAL = 14 ;
131 
132  static const Int_t nModEMCAL = 96 ;
133  static const Int_t nModDCAL = 96 ;
134 
135  static const Int_t nSubregionEtaEMCAL = 12 ;
136  static const Int_t nSubregionPhiEMCAL = 16 ;
137 
138  static const Int_t nSubregionEtaDCAL = 12 ;
139  static const Int_t nSubregionPhiDCAL = 10 ;
140 
141 
142  Int_t fNL0GammaPatch ;
144 
146  UInt_t fG [3][maxL1Gamma];
149 
151  UInt_t fJ [3][maxL1Jet] ;
154 
156  UInt_t fPHOSSubregion[36];
157 
158  UInt_t fV0A ;
159  UInt_t fV0C ;
160  UInt_t fS[4] ;
161  UInt_t fRho ;
162  UInt_t fPatchSize ;
163 
164  UInt_t fRegionEnable ;
165  UInt_t fFrameReceived ;
166  UInt_t fFwVersion ;
167 
168  Int_t GetnMod() const {
169  return (fDetector == kEMCAL)? nModEMCAL :
170  (fDetector == kDCAL )? nModDCAL :
171  0 ; }
172 
173  virtual void DecodeL1JetPatchIndexes( const int i, UInt_t *word32, const int offset);
174  virtual void DecodeL1GammaPatchIndexes(const int i, UInt_t *word32, const int offset);
175  virtual void DecodeL0GammaPatchIndexes( UInt_t *word32, const int offset);
176  virtual void DecodeTRUADC( UInt_t *word32, const int offset);
177  virtual void DecodePHOSSubregion( UInt_t *word32, const int offset);
178 
180  ClassDef(AliEMCALTriggerSTURawStream,2) ;
182 
183 };
184 
185 #endif //ALIEMCALTRIGGERSTURAWSTREAM_H
TBrowser b
Definition: RunAnaESD.C:12
AliEMCALTriggerSTURawStream()
Default constructor.
static const Int_t kPayLoadSizeV2EMCALRaw
96*32/2
provides access to EMCAL/DCAL STU DDL raw data.
virtual void DecodeL1JetPatchIndexes(const int i, UInt_t *word32, const int offset)
Decode L1 Jet patch indeces.
virtual void DumpPayLoad(const Option_t *option="ALL") const
Dump STU payload.
virtual UInt_t GetJ(int i, int j) const
virtual void Reset()
Reset arrays and raw stream.
UInt_t fADC[maxnTRU][maxnmoduleInTRU]
ADCs.
virtual Bool_t GetL1GammaPatch(const Int_t i, const Int_t j, Int_t &x, Int_t &y, Int_t &z) const
L1 gamma patch indexes.
UShort_t GetThreshold(Short_t a, Short_t b, Short_t c, UShort_t v0A, UShort_t v0C) const
Get threshold.
static const Int_t maxL1Jet
L1Jet_low,high (EMCAL,DCAL)
UInt_t fL1JetThreshold[maxL1Jet]
L1 Jet Threshold.
fPayloadType fPayload
Set by word size.
Int_t fNL1GammaPatch[maxL1Gamma]
N L1 Gamma Patch.
UShort_t fL1GammaPatchIndex[maxL1GammaPatchIndex][maxL1Gamma]
L1 Gamma Patch Index.
static const Int_t maxL1Gamma
L1Gamma_low,high (EMCAL)
virtual void GetADC(Int_t iTRU, UInt_t ADC[])
Time sums.
UInt_t fG[3][maxL1Gamma]
Gamma threshold parameter:A,B,C.
UInt_t fJ[3][maxL1Jet]
Jet threshold parameter:A,B,C.
static const Int_t kPayLoadSizeV2DCALRaw
96*14/2 +36
AliRawReader * fRawReader
Object for reading the raw data.
AliEMCALTriggerSTURawStream & operator=(const AliEMCALTriggerSTURawStream &rhs)
virtual UInt_t GetPHOSScale(int i) const
virtual Bool_t ReadPayLoad()
Read pay load.
static const Int_t kPayLoadSizeV2DCAL
21+11+11+42+ 56+ 56
virtual UInt_t GetL1JetThreshold(const int i) const
virtual Bool_t GetL0GammaPatch(const Int_t i, Int_t &x, Int_t &y) const
L0 gamma patches sent to STU (original access to L0 patch indexes)
fDetType fDetector
Set by function.
virtual UInt_t GetG(int i, int j) const
static const Int_t kPayLoadSizeV2EMCAL
17+11+11+96+128+128
virtual Int_t GetNL1GammaPatch(const int i) const
UInt_t fL1GammaThreshold[maxL1Gamma]
L1 Gamma Threshold.
virtual void DecodeL0GammaPatchIndexes(UInt_t *word32, const int offset)
Decode L0 Gamma patch indeces.
virtual void DecodeL1GammaPatchIndexes(const int i, UInt_t *word32, const int offset)
Decode L1 gamma patch indeces.
virtual void DecodeTRUADC(UInt_t *word32, const int offset)
Decode TRU ADC.
virtual UInt_t GetL1GammaThreshold(const int i) const
UShort_t fL0GammaPatchIndex[maxL0GammaPatchIndex]
L0 Gamma Patch Index.
virtual void DecodePHOSSubregion(UInt_t *word32, const int offset)
Decode PHOS sub-regions.
virtual Int_t GetNL1JetPatch(const int i) const
virtual void GetPHOSSubregion(UInt_t PHOSSubregion[])
virtual ~AliEMCALTriggerSTURawStream()
Destructor.
virtual UInt_t GetFrameReceived() const
UInt_t fS[4]
PHOS Scale parameter.
UInt_t fPHOSSubregion[36]
PHOS subregions.
virtual UInt_t GetRegionEnable() const
Int_t fNL1JetPatch[maxL1Jet]
N L1 Jet Patch.
virtual Bool_t GetL1JetPatch(const Int_t i, const Int_t j, Int_t &x, Int_t &y) const
L1 jet patch indexes.
UShort_t fL1JetPatchIndex[maxL1JetPatchIndex][maxL1Jet]
L1 Jet Patch Index.