]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TOF/AliTOFFEEConfig.h
added class to handle TOF information including event-time measurement performed...
[u/mrichter/AliRoot.git] / TOF / AliTOFFEEConfig.h
1 #ifndef ALITOFFEECONFIG_H
2 #define ALITOFFEECONFIG_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 /* $Id: AliTOFDecoder.h,v 1.2 2007/05/08 11:55:24 arcelli Exp $ */
8
9 ///////////////////////////////////////////////////////////////
10 //                                                           //
11 //   This classes provide the TOF FEE config object.         //
12 //                                                           //
13 ///////////////////////////////////////////////////////////////
14
15 #include <time.h>
16 #include "TROOT.h"
17
18 class AliTOFDRMConfig
19 {
20
21  private:
22
23   Int_t fDRMId; // DRM id
24   Int_t fOptLinkId; // opt link id
25   Int_t fFineDelayTTC; // fine delay TTC
26   Int_t fCoarseDelayTTC; // coarse delay TTC
27   Int_t fSelectTTC; // select TTC
28   Int_t fGhostDDL; // ghost DDL
29   Int_t fActiveTRM; // active TRM
30   Int_t fSlotMask; // slot mask
31   Int_t fPulserPolarity; // pulser polarity
32   Int_t fPulserFlag; // pulser flag
33   Int_t fPulserSection0; // pulser section 0
34   Int_t fPulserSection1; // pulser section 1
35   Int_t fPulserSection2; // pulser section 2
36   Int_t fPrePulseEnable; // pre pulse enable
37   Int_t fSelectMode; // select mode
38
39  public:
40
41   Int_t GetDRMId() const {return fDRMId;}; // get DRM id
42   Int_t GetOptLink() const {return fOptLinkId;}; // get opt link id
43   Int_t GetFineDelayTTC() const {return fFineDelayTTC;}; // get fine delay TTC
44   Int_t GetCoarseDelayTTC() const {return fCoarseDelayTTC;}; // get coarse delay TTC
45   Int_t GetSelectTTC() const {return fSelectTTC;}; // get select TTC
46   Int_t GetGhostDDL() const {return fGhostDDL;}; // get ghost DDL
47   Int_t GetActiveTRM() const {return fActiveTRM;}; // get active TRM
48   Int_t GetSlotMask() const {return fSlotMask;}; // get slot mask
49   Int_t GetPulserPolarity() const {return fPulserPolarity;}; // get pulser polarity
50   Int_t GetPulserFlag() const {return fPulserFlag;}; // get pulser flag
51   Int_t GetPulserSection0() const {return fPulserSection0;}; // get pulser section 0
52   Int_t GetPulserSection1() const {return fPulserSection1;}; // get pulser section 1
53   Int_t GetPulserSection2() const {return fPulserSection2;}; // get pulser section 2
54   Int_t GetPrePulserEnable() const {return fPrePulseEnable;}; // get pre pulse enable
55   Int_t GetSelectMode() const {return fSelectMode;}; // get select mode
56
57 };
58
59 class AliTOFLTMConfig
60 {
61
62  private:
63
64   Int_t fSlotId; // slot id
65   Int_t fSuperModuleId; // super module id
66   Int_t fOptLinkId; // opt link id
67   Int_t fVMEAddress; // VME address
68   Int_t fThreshold; // threshold
69   Int_t fDelayLine0; // delay line 0
70   Int_t fDelayLine1; // delay line 1
71   Int_t fDelayLine2; // delay line 2
72   Int_t fDelayLine3; // delay line 3
73   Int_t fDelayLine4; // delay line 4
74   Int_t fDelayLine5; // delay line 5
75   Int_t fDelayLine6; // delay line 6
76   Int_t fDelayLine7; // delay line 7
77
78  public:
79
80   Int_t GetSlotId() const {return fSlotId;}; // get slot id
81   Int_t GetSuperModuleId() const {return fSuperModuleId;}; // get super module id
82   Int_t GetOptLinkId() const {return fOptLinkId;}; // get opt link id
83   Int_t GetVMEAddress() const {return fVMEAddress;}; // get VME address
84   Int_t GetThreshold() const {return fThreshold;}; // get threshold
85   Int_t GetDelayLine0() const {return fDelayLine0;}; // get delay line 0
86   Int_t GetDelayLine1() const {return fDelayLine1;}; // get delay line 1
87   Int_t GetDelayLine2() const {return fDelayLine2;}; // get delay line 2
88   Int_t GetDelayLine3() const {return fDelayLine3;}; // get delay line 3
89   Int_t GetDelayLine4() const {return fDelayLine4;}; // get delay line 4
90   Int_t GetDelayLine5() const {return fDelayLine5;}; // get delay line 5
91   Int_t GetDelayLine6() const {return fDelayLine6;}; // get delay line 6
92   Int_t GetDelayLine7() const {return fDelayLine7;}; // get delay line 7
93
94 };
95
96 class AliTOFTRMConfig
97 {
98
99  private:
100
101   Int_t fSlotId; // slot id
102   Int_t fSuperModuleId; // super module id
103   Int_t fOptLinkId; // opt link id
104   Int_t fVMEAddress; // VME address
105   Int_t fMatchingWindow; // matching window
106   Int_t fLatencyWindow; // latency window
107   Int_t fTriggerLevelConfig; // trigger level config
108   Int_t fTriggerSubtraction; // trigger subtracion
109   Int_t fEdgeDetection; // edge detection
110   Int_t fPackingFlag; // packing flag
111   Int_t fChainAFlag; // chain A flag
112   Int_t fChainBFlag; // chain B flag
113   Int_t fActiveChipA; // active chip A
114   Int_t fActiveChipB; // active chip B
115   Int_t fMaskPB0; // mask PB 0
116   Int_t fMaskPB1; // mask PB 1
117   Int_t fMaskPB2; // mask PB 2
118   Int_t fMaskPB3; // mask PB 3
119   Int_t fMaskPB4; // mask PB 4
120   Int_t fMaskPB5; // mask PB 5
121   Int_t fMaskPB6; // mask PB 6
122   Int_t fMaskPB7; // mask PB 7
123   Int_t fMaskPB8; // mask PB 8
124   Int_t fMaskPB9; // mask PB 9
125
126  public:
127
128   Int_t GetSlotId() const {return fSlotId;}; // get slot id
129   Int_t GetSuperModuleId() const {return fSuperModuleId;}; // get super module id
130   Int_t GetOptLinkId() const {return fOptLinkId;}; // get opt link id
131   Int_t GetVMEAddress() const {return fVMEAddress;}; // get VME address
132   Int_t GetMatchingWindow() const {return fMatchingWindow;}; // get matching window
133   Int_t GetLatencyWindow() const {return fLatencyWindow;}; // get latency window
134   Int_t GetTriggerLevelConfig() const {return fTriggerLevelConfig;}; // get trigger level config
135   Int_t GetTriggerSubtraction() const {return fTriggerSubtraction;}; // get trigger subtracion
136   Int_t GetEdgeDetection() const {return fEdgeDetection;}; // get edge detection
137   Int_t GetPackingFlag() const {return fPackingFlag;}; // get packing flag
138   Int_t GetChainAFlag() const {return fChainAFlag;}; // get chain A flag
139   Int_t GetChainBFlag() const {return fChainBFlag;}; // get chain B flag
140   Int_t GetActiveChipA() const {return fActiveChipA;}; // get active chip A
141   Int_t GetActiveChipB() const {return fActiveChipB;}; // get active chip B
142   Int_t GetMaskPB0() const {return fMaskPB0;}; // get mask PB 0
143   Int_t GetMaskPB1() const {return fMaskPB1;}; // get mask PB 1
144   Int_t GetMaskPB2() const {return fMaskPB2;}; // get mask PB 2
145   Int_t GetMaskPB3() const {return fMaskPB3;}; // get mask PB 3
146   Int_t GetMaskPB4() const {return fMaskPB4;}; // get mask PB 4
147   Int_t GetMaskPB5() const {return fMaskPB5;}; // get mask PB 5
148   Int_t GetMaskPB6() const {return fMaskPB6;}; // get mask PB 6
149   Int_t GetMaskPB7() const {return fMaskPB7;}; // get mask PB 7
150   Int_t GetMaskPB8() const {return fMaskPB8;}; // get mask PB 8
151   Int_t GetMaskPB9() const {return fMaskPB9;}; // get mask PB 9
152
153 };
154
155
156 class AliTOFCrateConfig
157 {
158
159  private:
160   
161   static const Int_t fgkNumberOfTRMs = 10; // number of TRMs
162
163   enum EStatus_t {
164     kStatusDisabled = 0,
165     kStatusEnabled = 1
166   };
167
168   Int_t fDRMEnabled; // DRM enabled
169   AliTOFDRMConfig fDRMConfig; // DRM config
170   Int_t fLTMEnabled; // LTM enabled
171   AliTOFLTMConfig fLTMConfig; // LTM config
172   Int_t fCPDMEnabled; // CPDM enabled
173   Int_t fTRMEnabled[fgkNumberOfTRMs]; // TRM enabled array
174   AliTOFTRMConfig fTRMConfig[fgkNumberOfTRMs]; // TRM config array
175
176  public:
177   
178   static Int_t GetNumberOfTRMs() {return fgkNumberOfTRMs;}; // get number of TRMs
179   Int_t GetDRMEnabled() const {return fDRMEnabled;}; // get DRM enabled
180   Bool_t IsDRMEnabled() const {return fDRMEnabled == kStatusEnabled;}; // is DRM enabled
181   AliTOFDRMConfig *GetDRMConfig() {return &fDRMConfig;}; // get DRM config
182   Int_t GetLTMEnabled() const {return fLTMEnabled;}; // get LTM enabled
183   Bool_t IsLTMEnabled() const {return fLTMEnabled == kStatusEnabled;}; // is LTM enabled
184   AliTOFLTMConfig *GetLTMConfig() {return &fLTMConfig;}; // get LTM config
185   Int_t GetCPDMEnabled() const {return fCPDMEnabled;}; // get CPDM enabled
186   Bool_t IsCPDMEnabled() const {return fCPDMEnabled == kStatusEnabled;}; // is CPDM enabled
187   Int_t GetTRMEnabled(UShort_t iTRM) const {return iTRM < GetNumberOfTRMs() ? fTRMEnabled[iTRM] : 0;}; // get TRM enabled
188   Bool_t IsTRMEnabled(UShort_t iTRM) const {return iTRM < GetNumberOfTRMs() ? fTRMEnabled[iTRM] ==  kStatusEnabled : 0;}; // is TRM enabled
189   AliTOFTRMConfig *GetTRMConfig(UShort_t iTRM) {return iTRM < GetNumberOfTRMs() ? &fTRMConfig[iTRM] : NULL;}; // get TRM config
190
191 };
192
193 class AliTOFFEEConfig
194 {
195
196  private:
197
198   static const Int_t fgkNumberOfCrates = 72; // number of crates
199
200   Int_t fVersion; // version
201   time_t fDumpTime; // dump time
202   Int_t fRunNumber; // run number
203   Int_t fRunType; // run type
204   AliTOFCrateConfig fCrateConfig[fgkNumberOfCrates]; // crate config array
205
206  public:
207
208   static Int_t GetNumberOfCrates() {return fgkNumberOfCrates;}; // get number of crates
209   Int_t GetVersion() const {return fVersion;}; // get version
210   time_t GetDumpTime() const {return fDumpTime;}; // get dump time
211   Int_t GetRunNumber() const {return fRunNumber;}; // get run number
212   Int_t GetRunType() const {return fRunType;}; // get run type
213   AliTOFCrateConfig *GetCrateConfig(UShort_t iCrate) {return iCrate < GetNumberOfCrates() ? &fCrateConfig[iCrate] : NULL;}; // get crate config
214
215 };
216
217 #endif /* ALITOFFEE_H */