]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TOF/AliTOFFEEConfig.h
Bug fixed into equipmentID-volume correspondence
[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
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
59class 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
96class 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 fMaskPB0; // mask PB 0
114 Int_t fMaskPB1; // mask PB 1
115 Int_t fMaskPB2; // mask PB 2
116 Int_t fMaskPB3; // mask PB 3
117 Int_t fMaskPB4; // mask PB 4
118 Int_t fMaskPB5; // mask PB 5
119 Int_t fMaskPB6; // mask PB 6
120 Int_t fMaskPB7; // mask PB 7
121 Int_t fMaskPB8; // mask PB 8
122 Int_t fMaskPB9; // mask PB 9
123
124 public:
125
126 Int_t GetSlotId() const {return fSlotId;}; // get slot id
127 Int_t GetSuperModuleId() const {return fSuperModuleId;}; // get super module id
128 Int_t GetOptLinkId() const {return fOptLinkId;}; // get opt link id
129 Int_t GetVMEAddress() const {return fVMEAddress;}; // get VME address
130 Int_t GetMatchingWindow() const {return fMatchingWindow;}; // get matching window
131 Int_t GetLatencyWindow() const {return fLatencyWindow;}; // get latency window
132 Int_t GetTriggerLevelConfig() const {return fTriggerLevelConfig;}; // get trigger level config
133 Int_t GetTriggerSubtraction() const {return fTriggerSubtraction;}; // get trigger subtracion
134 Int_t GetEdgeDetection() const {return fEdgeDetection;}; // get edge detection
135 Int_t GetPackingFlag() const {return fPackingFlag;}; // get packing flag
136 Int_t GetChainAFlag() const {return fChainAFlag;}; // get chain A flag
137 Int_t GetChainBFlag() const {return fChainBFlag;}; // get chain B flag
138 Int_t GetMaskPB0() const {return fMaskPB0;}; // get mask PB 0
139 Int_t GetMaskPB1() const {return fMaskPB1;}; // get mask PB 1
140 Int_t GetMaskPB2() const {return fMaskPB2;}; // get mask PB 2
141 Int_t GetMaskPB3() const {return fMaskPB3;}; // get mask PB 3
142 Int_t GetMaskPB4() const {return fMaskPB4;}; // get mask PB 4
143 Int_t GetMaskPB5() const {return fMaskPB5;}; // get mask PB 5
144 Int_t GetMaskPB6() const {return fMaskPB6;}; // get mask PB 6
145 Int_t GetMaskPB7() const {return fMaskPB7;}; // get mask PB 7
146 Int_t GetMaskPB8() const {return fMaskPB8;}; // get mask PB 8
147 Int_t GetMaskPB9() const {return fMaskPB9;}; // get mask PB 9
148
149};
150
151
152class AliTOFCrateConfig
153{
154
155 private:
156
157 static const Int_t fgkNumberOfTRMs = 10; // number of TRMs
158
159 enum EStatus_t {
160 kStatusDisabled = 0,
161 kStatusEnabled = 1
162 };
163
164 Int_t fDRMEnabled; // DRM enabled
165 AliTOFDRMConfig fDRMConfig; // DRM config
166 Int_t fLTMEnabled; // LTM enabled
167 AliTOFLTMConfig fLTMConfig; // LTM config
168 Int_t fCPDMEnabled; // CPDM enabled
169 Int_t fTRMEnabled[fgkNumberOfTRMs]; // TRM enabled array
170 AliTOFTRMConfig fTRMConfig[fgkNumberOfTRMs]; // TRM config array
171
172 public:
173
174 static Int_t GetNumberOfTRMs() {return fgkNumberOfTRMs;}; // get number of TRMs
175 Int_t GetDRMEnabled() const {return fDRMEnabled;}; // get DRM enabled
176 Bool_t IsDRMEnabled() const {return fDRMEnabled == kStatusEnabled;}; // is DRM enabled
177 AliTOFDRMConfig *GetDRMConfig() {return &fDRMConfig;}; // get DRM config
178 Int_t GetLTMEnabled() const {return fLTMEnabled;}; // get LTM enabled
179 Bool_t IsLTMEnabled() const {return fLTMEnabled == kStatusEnabled;}; // is LTM enabled
180 AliTOFLTMConfig *GetLTMConfig() {return &fLTMConfig;}; // get LTM config
181 Int_t GetCPDMEnabled() const {return fCPDMEnabled;}; // get CPDM enabled
182 Bool_t IsCPDMEnabled() const {return fCPDMEnabled == kStatusEnabled;}; // is CPDM enabled
183 Int_t GetTRMEnabled(UShort_t iTRM) const {return iTRM < GetNumberOfTRMs() ? fTRMEnabled[iTRM] : 0;}; // get TRM enabled
184 Bool_t IsTRMEnabled(UShort_t iTRM) const {return iTRM < GetNumberOfTRMs() ? fTRMEnabled[iTRM] == kStatusEnabled : 0;}; // is TRM enabled
185 AliTOFTRMConfig *GetTRMConfig(UShort_t iTRM) {return iTRM < GetNumberOfTRMs() ? &fTRMConfig[iTRM] : NULL;}; // get TRM config
186
187};
188
189class AliTOFFEEConfig
190{
191
192 private:
193
194 static const Int_t fgkNumberOfCrates = 72; // number of crates
195
196 Int_t fVersion; // version
197 time_t fDumpTime; // dump time
198 Int_t fRunNumber; // run number
199 Int_t fRunType; // run type
200 AliTOFCrateConfig fCrateConfig[fgkNumberOfCrates]; // crate config array
201
202 public:
203
204 static Int_t GetNumberOfCrates() {return fgkNumberOfCrates;}; // get number of crates
205 Int_t GetVersion() const {return fVersion;}; // get version
206 time_t GetDumpTime() const {return fDumpTime;}; // get dump time
207 Int_t GetRunNumber() const {return fRunNumber;}; // get run number
208 Int_t GetRunType() const {return fRunType;}; // get run type
209 AliTOFCrateConfig *GetCrateConfig(UShort_t iCrate) {return iCrate < GetNumberOfCrates() ? &fCrateConfig[iCrate] : NULL;}; // get crate config
210
211};
212
213#endif /* ALITOFFEE_H */