]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONGlobalCrateConfig.h
Fixes for coding violations
[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
7d5d0cc5 12#ifndef ALI_MUON_GLOBAL_CRATE_CONFIG_H
13#define ALI_MUON_GLOBAL_CRATE_CONFIG_H
92c23b09 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
2129750f 29 void SetGlobalCrateEnable(UInt_t enable) {fGlobalCrateEnable = enable;}
92c23b09 30 /// Get global crate enbale
9ee1d6ff 31 UInt_t GetGlobalCrateEnable() const {return fGlobalCrateEnable;}
92c23b09 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;}
41a38dec 154 /// Set mask for the global input
155 void SetGlobalMask(Int_t index, UInt_t mask);
156 /// Get mask for the global input
157 UInt_t GetGlobalMask(Int_t index) const;
158 /// Indicates if global masks are active on global inputs
159 Bool_t GetMasksOn() const;
160
92c23b09 161 // fet board
162 /// Get FET board VME address
163 ULong_t GetFetVmeAddr() const {return fFetVmeAddr;}
164 /// Set FET board VME address
165 void SetFetVmeAddr(ULong_t addr) {fFetVmeAddr = addr;}
166
167 /// Get register for FET
168 UInt_t GetFetRegister(Int_t index) const;
169 /// Set register for FET
170 void SetFetRegister(Int_t index, UInt_t reg);
171 /// Set register word for FET
172 UInt_t* GetFetRegister() {return fFetRegisters;}
173
174 //static members
175 /// Get Jtag Name identifier
176 const Char_t* GetJtagName() const {return fgkJtagName;}
177 /// Get First Darc Name identifier
178 const Char_t* GetFirstDarcName() const {return fgkFirstDarcName;}
179 /// Get Second Darc Name identifier
180 const Char_t* GetSecondDarcName() const {return fgkSecondDarcName;}
181 /// Get Global Name identifier
182 const Char_t* GetGlobalName() const {return fgkGlobalName;}
183 /// Get Global Name identifier
184 const Char_t* GetFetName() const {return fgkFetName;}
185
186 /// Get number of registers for Global
94bf739c 187 Int_t GetGlobalNofRegisters() const {return fgkGlobalNofRegisters;}
92c23b09 188 /// Get number of registers for FET
94bf739c 189 Int_t GetFetNofRegisters() const {return fgkFetNofRegisters;}
92c23b09 190 /// Get number of JTag lines
94bf739c 191 Int_t GetJtagNofLines() const {return fgkJtagNofLines;}
92c23b09 192
193 private:
194 /// Not implemented
195 AliMUONGlobalCrateConfig(const AliMUONGlobalCrateConfig& rhs);
196 /// Not implemented
197 AliMUONGlobalCrateConfig& operator=(const AliMUONGlobalCrateConfig& rhs);
198
199 // data members
2129750f 200 UInt_t fGlobalCrateEnable; ///< Global Crate Enable
92c23b09 201 ULong_t fJtagVmeAddr; ///< JTag VME address
202 UInt_t fJtagClockDiv; ///< Clock Divider number for JTag
203 UInt_t fJtagRxPhase; ///< Rx phase number for JTag
204 UInt_t fJtagRdDelay; ///< Read delay for JTag
205 UChar_t fEnableJtag; ///< Enable mask for JTag lines
206 TString fJtagCrateName[16]; ///< Crate name for the Jtag lines
207
208 ULong_t fFirstDarcVmeAddr; ///< First Darc Board VME Address
209 Int_t fFirstDarcType; ///< Type of the first Darc Board
210 UChar_t fFirstDarcDisable; ///< disable the readout of the 8 crates connected to this board
211 UInt_t fFirstDarcL0Delay; ///< L0 delay for this board
212 UInt_t fFirstDarcL1TimeOut; ///< L1 time out for this board
213 UInt_t fFirstDarcGlobalL0 ; ///< L0 global l0 delay this board
214 UInt_t fFirstDarcConfig ; ///< Trigger configuration this board
215
216 ULong_t fSecondDarcVmeAddr; ///< Second Darc Board VME Address
217 Int_t fSecondDarcType; ///< Type of the first Darc Board
218 UChar_t fSecondDarcDisable; ///< disable the readout of the 8 crates connected to this board
219 UInt_t fSecondDarcL0Delay; ///< L0 delay for this board
220 UInt_t fSecondDarcL1TimeOut; ///< L1 time out for this board
221 UInt_t fSecondDarcGlobalL0; ///< Global L0 delay for this board
222 UInt_t fSecondDarcConfig ; ///< Trigger configuration this board
223
224 ULong_t fGlobalVmeAddr; ///< Global Board VME Address
225 UInt_t fGlobalRegisters[13]; ///< Global registers
226
227 ULong_t fFetVmeAddr; ///< Fet Board VME Address
228 UInt_t fFetRegisters[7]; ///< Fet registers
229
230 static const Char_t* fgkJtagName; ///< JTag Board name
231 static const Char_t* fgkFirstDarcName; ///< First DARC board name
232 static const Char_t* fgkSecondDarcName; ///< Second DARC board name
233 static const Char_t* fgkGlobalName; ///< Global Board name
234 static const Char_t* fgkFetName; ///< FET Board name
235
236 static const Int_t fgkGlobalNofRegisters; ///< Number of registers for Global Board
237 static const Int_t fgkFetNofRegisters; ///< Number of registers for Fet
238 static const Int_t fgkJtagNofLines; ///< Number of lines for Jtag
239
aca1050a 240 ClassDef(AliMUONGlobalCrateConfig,3)
92c23b09 241};
242
243#endif
244
245
246
247
248
249
250
251
252
253
254
255
256
257