Updates
[u/mrichter/AliRoot.git] / TOF / AliTOFFEEConfig.h
CommitLineData
1605abc6 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
18class 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
5b4ed716 38 Int_t fBLTMask; // BLT mask
1605abc6 39
40 public:
41
42 Int_t GetDRMId() const {return fDRMId;}; // get DRM id
43 Int_t GetOptLink() const {return fOptLinkId;}; // get opt link id
44 Int_t GetFineDelayTTC() const {return fFineDelayTTC;}; // get fine delay TTC
45 Int_t GetCoarseDelayTTC() const {return fCoarseDelayTTC;}; // get coarse delay TTC
46 Int_t GetSelectTTC() const {return fSelectTTC;}; // get select TTC
47 Int_t GetGhostDDL() const {return fGhostDDL;}; // get ghost DDL
48 Int_t GetActiveTRM() const {return fActiveTRM;}; // get active TRM
49 Int_t GetSlotMask() const {return fSlotMask;}; // get slot mask
50 Int_t GetPulserPolarity() const {return fPulserPolarity;}; // get pulser polarity
51 Int_t GetPulserFlag() const {return fPulserFlag;}; // get pulser flag
52 Int_t GetPulserSection0() const {return fPulserSection0;}; // get pulser section 0
53 Int_t GetPulserSection1() const {return fPulserSection1;}; // get pulser section 1
54 Int_t GetPulserSection2() const {return fPulserSection2;}; // get pulser section 2
55 Int_t GetPrePulserEnable() const {return fPrePulseEnable;}; // get pre pulse enable
56 Int_t GetSelectMode() const {return fSelectMode;}; // get select mode
5b4ed716 57 Int_t GetBLTMask() const {return fBLTMask;}; // get BLT mask
1605abc6 58
59};
60
61class AliTOFLTMConfig
62{
63
64 private:
65
66 Int_t fSlotId; // slot id
67 Int_t fSuperModuleId; // super module id
68 Int_t fOptLinkId; // opt link id
69 Int_t fVMEAddress; // VME address
70 Int_t fThreshold; // threshold
5b4ed716 71 Int_t fTriggerEnable; // trigger enable
72 Int_t fTriggerMask1; // trigger mask1
73 Int_t fTriggerMask2; // trigger mask2
74#if 0
1605abc6 75 Int_t fDelayLine0; // delay line 0
76 Int_t fDelayLine1; // delay line 1
77 Int_t fDelayLine2; // delay line 2
78 Int_t fDelayLine3; // delay line 3
79 Int_t fDelayLine4; // delay line 4
80 Int_t fDelayLine5; // delay line 5
81 Int_t fDelayLine6; // delay line 6
82 Int_t fDelayLine7; // delay line 7
5b4ed716 83#endif
1605abc6 84
85 public:
86
87 Int_t GetSlotId() const {return fSlotId;}; // get slot id
88 Int_t GetSuperModuleId() const {return fSuperModuleId;}; // get super module id
89 Int_t GetOptLinkId() const {return fOptLinkId;}; // get opt link id
90 Int_t GetVMEAddress() const {return fVMEAddress;}; // get VME address
91 Int_t GetThreshold() const {return fThreshold;}; // get threshold
5b4ed716 92 Int_t GetTriggerEnable() const {return fTriggerEnable;}; // get trigger enable
93 Int_t GetTriggerMask1() const {return fTriggerMask1;}; // get trigger mask1
94 Int_t GetTriggerMask2() const {return fTriggerMask2;}; // get trigger mask2
95#if 0
1605abc6 96 Int_t GetDelayLine0() const {return fDelayLine0;}; // get delay line 0
97 Int_t GetDelayLine1() const {return fDelayLine1;}; // get delay line 1
98 Int_t GetDelayLine2() const {return fDelayLine2;}; // get delay line 2
99 Int_t GetDelayLine3() const {return fDelayLine3;}; // get delay line 3
100 Int_t GetDelayLine4() const {return fDelayLine4;}; // get delay line 4
101 Int_t GetDelayLine5() const {return fDelayLine5;}; // get delay line 5
102 Int_t GetDelayLine6() const {return fDelayLine6;}; // get delay line 6
103 Int_t GetDelayLine7() const {return fDelayLine7;}; // get delay line 7
5b4ed716 104#endif
1605abc6 105
106};
107
108class AliTOFTRMConfig
109{
110
111 private:
112
113 Int_t fSlotId; // slot id
114 Int_t fSuperModuleId; // super module id
115 Int_t fOptLinkId; // opt link id
116 Int_t fVMEAddress; // VME address
117 Int_t fMatchingWindow; // matching window
118 Int_t fLatencyWindow; // latency window
5b4ed716 119 Int_t fBunchCrossingAdjust; // bunch crossing adjust
1605abc6 120 Int_t fTriggerLevelConfig; // trigger level config
121 Int_t fTriggerSubtraction; // trigger subtracion
122 Int_t fEdgeDetection; // edge detection
123 Int_t fPackingFlag; // packing flag
5b4ed716 124 Int_t fLVStatus; // LV status
1605abc6 125 Int_t fChainAFlag; // chain A flag
126 Int_t fChainBFlag; // chain B flag
71b82bd2 127 Int_t fActiveChipA; // active chip A
128 Int_t fActiveChipB; // active chip B
1605abc6 129 Int_t fMaskPB0; // mask PB 0
130 Int_t fMaskPB1; // mask PB 1
131 Int_t fMaskPB2; // mask PB 2
132 Int_t fMaskPB3; // mask PB 3
133 Int_t fMaskPB4; // mask PB 4
134 Int_t fMaskPB5; // mask PB 5
135 Int_t fMaskPB6; // mask PB 6
136 Int_t fMaskPB7; // mask PB 7
137 Int_t fMaskPB8; // mask PB 8
138 Int_t fMaskPB9; // mask PB 9
139
140 public:
141
142 Int_t GetSlotId() const {return fSlotId;}; // get slot id
143 Int_t GetSuperModuleId() const {return fSuperModuleId;}; // get super module id
144 Int_t GetOptLinkId() const {return fOptLinkId;}; // get opt link id
145 Int_t GetVMEAddress() const {return fVMEAddress;}; // get VME address
146 Int_t GetMatchingWindow() const {return fMatchingWindow;}; // get matching window
147 Int_t GetLatencyWindow() const {return fLatencyWindow;}; // get latency window
5b4ed716 148 Int_t GetBunchCrossingAdjust() const {return fBunchCrossingAdjust;}; // get bunch crossing adjust
1605abc6 149 Int_t GetTriggerLevelConfig() const {return fTriggerLevelConfig;}; // get trigger level config
150 Int_t GetTriggerSubtraction() const {return fTriggerSubtraction;}; // get trigger subtracion
151 Int_t GetEdgeDetection() const {return fEdgeDetection;}; // get edge detection
152 Int_t GetPackingFlag() const {return fPackingFlag;}; // get packing flag
5b4ed716 153 Int_t GetLVStatus() const {return fLVStatus;}; // get LV status
1605abc6 154 Int_t GetChainAFlag() const {return fChainAFlag;}; // get chain A flag
155 Int_t GetChainBFlag() const {return fChainBFlag;}; // get chain B flag
71b82bd2 156 Int_t GetActiveChipA() const {return fActiveChipA;}; // get active chip A
157 Int_t GetActiveChipB() const {return fActiveChipB;}; // get active chip B
1605abc6 158 Int_t GetMaskPB0() const {return fMaskPB0;}; // get mask PB 0
159 Int_t GetMaskPB1() const {return fMaskPB1;}; // get mask PB 1
160 Int_t GetMaskPB2() const {return fMaskPB2;}; // get mask PB 2
161 Int_t GetMaskPB3() const {return fMaskPB3;}; // get mask PB 3
162 Int_t GetMaskPB4() const {return fMaskPB4;}; // get mask PB 4
163 Int_t GetMaskPB5() const {return fMaskPB5;}; // get mask PB 5
164 Int_t GetMaskPB6() const {return fMaskPB6;}; // get mask PB 6
165 Int_t GetMaskPB7() const {return fMaskPB7;}; // get mask PB 7
166 Int_t GetMaskPB8() const {return fMaskPB8;}; // get mask PB 8
167 Int_t GetMaskPB9() const {return fMaskPB9;}; // get mask PB 9
168
169};
170
171
172class AliTOFCrateConfig
173{
174
175 private:
176
177 static const Int_t fgkNumberOfTRMs = 10; // number of TRMs
178
179 enum EStatus_t {
180 kStatusDisabled = 0,
181 kStatusEnabled = 1
182 };
183
184 Int_t fDRMEnabled; // DRM enabled
185 AliTOFDRMConfig fDRMConfig; // DRM config
186 Int_t fLTMEnabled; // LTM enabled
187 AliTOFLTMConfig fLTMConfig; // LTM config
188 Int_t fCPDMEnabled; // CPDM enabled
189 Int_t fTRMEnabled[fgkNumberOfTRMs]; // TRM enabled array
190 AliTOFTRMConfig fTRMConfig[fgkNumberOfTRMs]; // TRM config array
191
192 public:
193
194 static Int_t GetNumberOfTRMs() {return fgkNumberOfTRMs;}; // get number of TRMs
195 Int_t GetDRMEnabled() const {return fDRMEnabled;}; // get DRM enabled
196 Bool_t IsDRMEnabled() const {return fDRMEnabled == kStatusEnabled;}; // is DRM enabled
197 AliTOFDRMConfig *GetDRMConfig() {return &fDRMConfig;}; // get DRM config
198 Int_t GetLTMEnabled() const {return fLTMEnabled;}; // get LTM enabled
199 Bool_t IsLTMEnabled() const {return fLTMEnabled == kStatusEnabled;}; // is LTM enabled
200 AliTOFLTMConfig *GetLTMConfig() {return &fLTMConfig;}; // get LTM config
201 Int_t GetCPDMEnabled() const {return fCPDMEnabled;}; // get CPDM enabled
202 Bool_t IsCPDMEnabled() const {return fCPDMEnabled == kStatusEnabled;}; // is CPDM enabled
203 Int_t GetTRMEnabled(UShort_t iTRM) const {return iTRM < GetNumberOfTRMs() ? fTRMEnabled[iTRM] : 0;}; // get TRM enabled
204 Bool_t IsTRMEnabled(UShort_t iTRM) const {return iTRM < GetNumberOfTRMs() ? fTRMEnabled[iTRM] == kStatusEnabled : 0;}; // is TRM enabled
205 AliTOFTRMConfig *GetTRMConfig(UShort_t iTRM) {return iTRM < GetNumberOfTRMs() ? &fTRMConfig[iTRM] : NULL;}; // get TRM config
206
207};
208
209class AliTOFFEEConfig
210{
211
212 private:
213
214 static const Int_t fgkNumberOfCrates = 72; // number of crates
215
216 Int_t fVersion; // version
217 time_t fDumpTime; // dump time
218 Int_t fRunNumber; // run number
219 Int_t fRunType; // run type
5b4ed716 220 Int_t fBytes; // bytes
221 Int_t fCTTMTriggerMask[fgkNumberOfCrates]; // CTTM trigger mask
1605abc6 222 AliTOFCrateConfig fCrateConfig[fgkNumberOfCrates]; // crate config array
223
224 public:
225
226 static Int_t GetNumberOfCrates() {return fgkNumberOfCrates;}; // get number of crates
227 Int_t GetVersion() const {return fVersion;}; // get version
228 time_t GetDumpTime() const {return fDumpTime;}; // get dump time
229 Int_t GetRunNumber() const {return fRunNumber;}; // get run number
230 Int_t GetRunType() const {return fRunType;}; // get run type
5b4ed716 231 Int_t GetBytes() const {return fBytes;}; // get bytes
4492324e 232 Int_t GetCTTMTriggerMask(UShort_t iCrate) const {return iCrate < GetNumberOfCrates() ? fCTTMTriggerMask[iCrate] : 0;}; // get CTTM trigger mask
1605abc6 233 AliTOFCrateConfig *GetCrateConfig(UShort_t iCrate) {return iCrate < GetNumberOfCrates() ? &fCrateConfig[iCrate] : NULL;}; // get crate config
234
235};
236
237#endif /* ALITOFFEE_H */