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