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