]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/MUONmapping/AliMpBusPatch.h
Fixes for object target dependencies
[u/mrichter/AliRoot.git] / MUON / MUONmapping / AliMpBusPatch.h
1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2  * See cxx source for full Copyright notice                               */
3
4 // $Id$
5 // $MpId: $ 
6
7 /// \ingroup management
8 /// \class AliMpBusPatch
9 /// \brief The class defines the properties of BusPatch
10 ///
11 /// \author Ivana Hrivnacova, IPN Orsay
12
13 #ifndef ALI_MP_BUS_PATCH_H
14 #define ALI_MP_BUS_PATCH_H
15
16 #include <TObject.h>
17 #include <TString.h>
18
19 #include "AliMpArrayI.h"
20
21 class AliMpBusPatch : public  TObject {
22
23   public:
24     AliMpBusPatch(Int_t id, Int_t deId, Int_t ddlId);
25     AliMpBusPatch(TRootIOCtor* /*ioCtor*/);
26     virtual ~AliMpBusPatch();
27
28     // static methods
29     static Int_t GetGlobalBusID(Int_t localID, Int_t ddlID);
30     static Int_t GetLocalBusID(Int_t globalID, Int_t ddlID);
31
32     // methods 
33     Bool_t AddManu(Int_t manuId);
34     Bool_t SetNofManusPerModule(Int_t manuNumber = 0);
35     void   SetTranslatorLabel(TString label);
36     void   SetCableLabel(TString label); 
37     void   SetCableLength(Float_t length);
38     void   SetFrtId(Int_t id);
39     void   RevertReadout();
40     void   ResetReadout();
41   
42     // get methods
43     Int_t  GetId() const;
44     Int_t  GetDEId() const;
45     Int_t  GetDdlId() const;
46     Int_t  GetFrtId() const;
47     Int_t  GetNofManus() const;
48     Int_t  GetManuId(Int_t index) const;
49     Bool_t HasManu(Int_t manuId) const;
50     
51     Int_t  GetNofPatchModules() const;
52     Int_t  GetNofManusPerModule(Int_t patchModule) const;
53     
54     Float_t  GetCableLength() const;
55     TString  GetCableLabel() const;
56     TString  GetTranslatorLabel() const;
57   TString GetFRTPosition() const;
58   
59   virtual void Print(Option_t* opt="") const;
60   
61   private:
62     /// Not implemented
63     AliMpBusPatch();
64     /// Not implemented
65     AliMpBusPatch(const AliMpBusPatch& rhs);
66     /// Not implemented
67     AliMpBusPatch& operator=(const AliMpBusPatch& rhs);
68
69     // static data members      
70     static const Int_t  fgkOffset; ///< Offset for conversion global/local ID  
71
72     // data members     
73     Int_t        fId;     ///< Identifier (unique)
74     Int_t        fDEId;   ///< Detection element to which this bus patch is connected
75     Int_t        fDdlId;  ///< DDL to which this bus patch is connected
76     AliMpArrayI  fManus;  ///< Manu Ids connected to this bus patch
77     AliMpArrayI  fNofManusPerModule; ///< Nof Manus per patch modules (PCBs)
78     Float_t      fCableLength;       ///< length of the buspatch cable
79     TString      fCableLabel;        ///< label of the buspatch cable
80     TString      fTranslatorLabel;   ///< label of the translator board
81     Int_t        fFrtId;               ///< FRT Ids connected to this bus patch
82
83   ClassDef(AliMpBusPatch,3)  // The class collectiong electronics properties of DDL
84 };
85
86 // inline functions
87
88 /// Return the unique Id
89 inline Int_t AliMpBusPatch::GetId() const
90 {  return fId; }
91
92 /// Return the Detection element Id
93 inline Int_t AliMpBusPatch::GetDEId() const
94 {  return fDEId; }
95
96 /// Return the Ddl Id
97 inline Int_t AliMpBusPatch::GetDdlId() const
98 {  return fDdlId; }
99
100 /// Return the FRT Id
101 inline Int_t AliMpBusPatch::GetFrtId() const
102 {  return fFrtId; }
103
104 /// Return length of buspatch
105 inline Float_t  AliMpBusPatch::GetCableLength() const
106 { return fCableLength; }
107
108 /// Set FRT id for buspatch
109 inline void  AliMpBusPatch::SetFrtId(Int_t id)
110 { fFrtId = id; }
111
112 /// Set length of buspatch
113 inline void  AliMpBusPatch::SetCableLength(Float_t length)
114 { fCableLength = length; }
115
116 /// Return label of buspatch
117 inline TString  AliMpBusPatch::GetCableLabel() const
118 { return fCableLabel; }
119
120 /// Set label of buspatch
121 inline void  AliMpBusPatch::SetCableLabel(TString label)
122 { fCableLabel = label; }
123
124 /// Return label of translator
125 inline TString  AliMpBusPatch::GetTranslatorLabel() const
126 { return fCableLabel; }
127
128 /// Set label of translator
129 inline void  AliMpBusPatch::SetTranslatorLabel(TString label)
130 { fTranslatorLabel = label; }
131
132
133 #endif //ALI_BUS_PATCH_H
134
135
136
137
138
139
140
141
142
143
144
145
146
147