]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONGlobalCrateConfig.h
Separating run-dependent mapping data from data, which are not
[u/mrichter/AliRoot.git] / MUON / AliMUONGlobalCrateConfig.h
CommitLineData
92c23b09 1/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
3
bf4d93eb 4// $Id$
92c23b09 5
6/// \ingroup calib
7/// \class AliMUONGlobalCrateConfig
8/// \brief The class defines the configuration of global crate
9///
10/// \author Ch. Finck, Subatech Nantes
11
12#ifndef ALIMUON_GLOBAL_CRATE_CONFIG_H
13#define ALIMUON_GLOBAL_CRATE_CONFIG_H
14
15#include <TNamed.h>
16#include <TString.h>
17
18class AliMUONGlobalCrateConfig : public TNamed {
19
20 public:
21 AliMUONGlobalCrateConfig();
22 virtual ~AliMUONGlobalCrateConfig();
23
24 // methods
25 Int_t ReadData(const TString& fileName = "");
26
27 // global crate enable
28 /// set global crate enbale
29 void SetGlobalCrateEnable(UChar_t enable) {fGlobalCrateEnable = enable;}
30 /// Get global crate enbale
31 UChar_t GetGlobalCrateEnable() {return fGlobalCrateEnable;}
32
33 // Jtag
34 /// Get Jtag board VME address
35 ULong_t GetJtagVmeAddr() const {return fJtagVmeAddr;}
36 /// Set Jtag board VME address
37 void SetJtagVmeAddr(ULong_t addr) {fJtagVmeAddr = addr;}
38
39 /// Get Jtag board Clock Divider
40 UInt_t GetJtagClockDiv() const {return fJtagClockDiv;}
41 /// Set Jtag board Clock Divider
42 void SetJtagClockDiv(UInt_t clk) {fJtagClockDiv = clk;}
43
44 /// Get Jtag board Rx Phase
45 UInt_t GetJtagRxPhase() const {return fJtagRxPhase;}
46 /// Set Jtag board Rx Phase
47 void SetJtagRxPhase(UInt_t rx) {fJtagRxPhase = rx;}
48
49 /// Get Jtag board Read out Delay
50 UInt_t GetJtagRdDelay() const {return fJtagRdDelay;}
51 /// Set Jtag board Read out Delay
52 void SetJtagRdDelay(UInt_t rd) {fJtagRdDelay = rd;}
53
54 /// Get Jtag enabled lines
55 Bool_t GetEnableJtag(Int_t index) const;
56 /// Set Jtag enable word
57 void SetEnableJtag(UChar_t en) {fEnableJtag = en;}
58 /// Get Jtag enable word
59 UChar_t GetEnableJtag() const {return fEnableJtag;}
60
61 /// Get Jtag Crate names
62 TString GetJtagCrateName(Int_t jtagLine, Int_t index) const;
63 /// Set Jtag Crate names
64 void SetJtagCrateName(Int_t index, TString name);
65
66 // first Darc Board
67 /// Get First Darc board VME address
68 ULong_t GetFirstDarcVmeAddr() const {return fFirstDarcVmeAddr;}
69 /// Get First Darc board VME address
70 void SetFirstDarcVmeAddr(ULong_t addr) {fFirstDarcVmeAddr = addr;}
71
72 /// Get type for First Darc board
73 Int_t GetFirstDarcType() const {return fFirstDarcType;}
74 /// Get type for First Darc board
75 void SetFirstDarcType(Int_t type) {fFirstDarcType = type;}
76
77 /// Get disable word for First Darc board
78 UChar_t GetFirstDarcDisable() const {return fFirstDarcDisable;}
79 /// Get disable per regional crate for First Darc board
80 Bool_t GetFirstDarcDisable(Int_t iCrate) const {return !((fFirstDarcDisable >> iCrate) & 0x1);}
81 /// Set disable word for First Darc board
82 void SetFirstDarcDisable(UChar_t en) {fFirstDarcDisable = en;}
83
84 /// Get L0 Delay for First Darc board
85 UInt_t GetFirstDarcL0Delay() const {return fFirstDarcL0Delay;}
86 /// Set L0 Delay for First Darc board
87 void SetFirstDarcL0Delay(UInt_t delay) {fFirstDarcL0Delay = delay;}
88
89 /// Get L1 Time Out for First Darc board
90 UInt_t GetFirstDarcL1TimeOut() const {return fFirstDarcL1TimeOut;}
91 /// Set L1 Time Out for First Darc board
92 void SetFirstDarcL1TimeOut(UInt_t time) {fFirstDarcL1TimeOut = time;}
93
94 /// Get global L0 delay for First Darc board
95 UInt_t GetFirstDarcGlobalL0() const {return fFirstDarcGlobalL0;}
96 /// set global L0 delay for First Darc board
97 void SetFirstDarcGlobalL0(UInt_t time) {fFirstDarcGlobalL0 = time;}
98
99 /// Get configuration for First Darc board
100 UInt_t GetFirstDarcConfig() const {return fFirstDarcConfig;}
101 /// set configuration for First Darc board
102 void SetFirstDarcConfig(UInt_t conf) {fFirstDarcConfig = conf;}
103
104 // second Darc Board
105 /// Get Second Darc board VME address
106 ULong_t GetSecondDarcVmeAddr() const {return fSecondDarcVmeAddr;}
107 /// Set Second Darc board VME address
108 void SetSecondDarcVmeAddr(ULong_t addr) {fSecondDarcVmeAddr = addr;}
109
110 /// Get type for Second Darc board
111 Int_t GetSecondDarcType() const {return fSecondDarcType;}
112 /// Set type for Second Darc board
113 void SetSecondDarcType(Int_t type) {fSecondDarcType = type;}
114
115 /// Get disable word for Second Darc board
116 UChar_t GetSecondDarcDisable() const {return fSecondDarcDisable;}
117 /// Get disable per regional crate for Second Darc board
118 Bool_t GetSecondDarcDisable(Int_t iCrate) const {return !((fSecondDarcDisable >> iCrate) & 0x1);}
119 /// Set disable word for Second Darc board
120 void SetSecondDarcDisable(UChar_t en) {fSecondDarcDisable = en;}
121
122 /// Get L0 Delay for Second Darc board
123 UInt_t GetSecondDarcL0Delay() const {return fSecondDarcL0Delay;}
124 /// Set L0 Delay for Second Darc board
125 void SetSecondDarcL0Delay(UInt_t delay) {fSecondDarcL0Delay = delay;}
126 /// Get L1 Time Out for Second Darc board
127 UInt_t GetSecondDarcL1TimeOut() const {return fSecondDarcL1TimeOut;}
128 /// Set L1 Time Out for Second Darc board
129 void SetSecondDarcL1TimeOut(UInt_t time) {fSecondDarcL1TimeOut = time;}
130
131 /// Get global L0 delay for Second Darc board
132 UInt_t GetSecondDarcGlobalL0() const {return fSecondDarcGlobalL0;}
133 /// set global L0 delay for Second Darc board
134 void SetSecondDarcGlobalL0(UInt_t time) {fSecondDarcGlobalL0 = time;}
135
136 /// Get configuration for Second Darc board
137 UInt_t GetSecondDarcConfig() const {return fSecondDarcConfig;}
138 /// set configuration for Second Darc board
139 void SetSecondDarcConfig(UInt_t conf) {fSecondDarcConfig = conf;}
140
141
142 // global board
143 /// Get Global board VME address
144 ULong_t GetGlobalVmeAddr() const {return fGlobalVmeAddr;}
145 /// Set Global board VME address
146 void SetGlobalVmeAddr(ULong_t addr) {fGlobalVmeAddr = addr;}
147
148 /// Get register for Global
149 UInt_t GetGlobalRegister(Int_t index) const;
150 /// Set register for Global
151 void SetGlobalRegister(Int_t index, UInt_t reg);
152 /// Get register word for Global
153 UInt_t* GetGlobalRegister() {return fGlobalRegisters;}
154
155 // fet board
156 /// Get FET board VME address
157 ULong_t GetFetVmeAddr() const {return fFetVmeAddr;}
158 /// Set FET board VME address
159 void SetFetVmeAddr(ULong_t addr) {fFetVmeAddr = addr;}
160
161 /// Get register for FET
162 UInt_t GetFetRegister(Int_t index) const;
163 /// Set register for FET
164 void SetFetRegister(Int_t index, UInt_t reg);
165 /// Set register word for FET
166 UInt_t* GetFetRegister() {return fFetRegisters;}
167
168 //static members
169 /// Get Jtag Name identifier
170 const Char_t* GetJtagName() const {return fgkJtagName;}
171 /// Get First Darc Name identifier
172 const Char_t* GetFirstDarcName() const {return fgkFirstDarcName;}
173 /// Get Second Darc Name identifier
174 const Char_t* GetSecondDarcName() const {return fgkSecondDarcName;}
175 /// Get Global Name identifier
176 const Char_t* GetGlobalName() const {return fgkGlobalName;}
177 /// Get Global Name identifier
178 const Char_t* GetFetName() const {return fgkFetName;}
179
180 /// Get number of registers for Global
181 const Int_t GetGlobalNofRegisters() const {return fgkGlobalNofRegisters;}
182 /// Get number of registers for FET
183 const Int_t GetFetNofRegisters() const {return fgkFetNofRegisters;}
184 /// Get number of JTag lines
185 const Int_t GetJtagNofLines() const {return fgkJtagNofLines;}
186
187 private:
188 /// Not implemented
189 AliMUONGlobalCrateConfig(const AliMUONGlobalCrateConfig& rhs);
190 /// Not implemented
191 AliMUONGlobalCrateConfig& operator=(const AliMUONGlobalCrateConfig& rhs);
192
193 // data members
194 UChar_t fGlobalCrateEnable; ///< Global Crate Enable
195 ULong_t fJtagVmeAddr; ///< JTag VME address
196 UInt_t fJtagClockDiv; ///< Clock Divider number for JTag
197 UInt_t fJtagRxPhase; ///< Rx phase number for JTag
198 UInt_t fJtagRdDelay; ///< Read delay for JTag
199 UChar_t fEnableJtag; ///< Enable mask for JTag lines
200 TString fJtagCrateName[16]; ///< Crate name for the Jtag lines
201
202 ULong_t fFirstDarcVmeAddr; ///< First Darc Board VME Address
203 Int_t fFirstDarcType; ///< Type of the first Darc Board
204 UChar_t fFirstDarcDisable; ///< disable the readout of the 8 crates connected to this board
205 UInt_t fFirstDarcL0Delay; ///< L0 delay for this board
206 UInt_t fFirstDarcL1TimeOut; ///< L1 time out for this board
207 UInt_t fFirstDarcGlobalL0 ; ///< L0 global l0 delay this board
208 UInt_t fFirstDarcConfig ; ///< Trigger configuration this board
209
210 ULong_t fSecondDarcVmeAddr; ///< Second Darc Board VME Address
211 Int_t fSecondDarcType; ///< Type of the first Darc Board
212 UChar_t fSecondDarcDisable; ///< disable the readout of the 8 crates connected to this board
213 UInt_t fSecondDarcL0Delay; ///< L0 delay for this board
214 UInt_t fSecondDarcL1TimeOut; ///< L1 time out for this board
215 UInt_t fSecondDarcGlobalL0; ///< Global L0 delay for this board
216 UInt_t fSecondDarcConfig ; ///< Trigger configuration this board
217
218 ULong_t fGlobalVmeAddr; ///< Global Board VME Address
219 UInt_t fGlobalRegisters[13]; ///< Global registers
220
221 ULong_t fFetVmeAddr; ///< Fet Board VME Address
222 UInt_t fFetRegisters[7]; ///< Fet registers
223
224 static const Char_t* fgkJtagName; ///< JTag Board name
225 static const Char_t* fgkFirstDarcName; ///< First DARC board name
226 static const Char_t* fgkSecondDarcName; ///< Second DARC board name
227 static const Char_t* fgkGlobalName; ///< Global Board name
228 static const Char_t* fgkFetName; ///< FET Board name
229
230 static const Int_t fgkGlobalNofRegisters; ///< Number of registers for Global Board
231 static const Int_t fgkFetNofRegisters; ///< Number of registers for Fet
232 static const Int_t fgkJtagNofLines; ///< Number of lines for Jtag
233
234 ClassDef(AliMUONGlobalCrateConfig,2)
235};
236
237#endif
238
239
240
241
242
243
244
245
246
247
248
249
250
251