AliRoot Core  3abf5b4 (3abf5b4)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMpBusPatch.h
Go to the documentation of this file.
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 
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:
63  AliMpBusPatch();
65  AliMpBusPatch(const AliMpBusPatch& rhs);
68 
69  // static data members
70  static const Int_t fgkOffset;
71 
72  // data members
73  Int_t fId;
74  Int_t fDEId;
75  Int_t fDdlId;
78  Float_t fCableLength;
79  TString fCableLabel;
80  TString fTranslatorLabel;
81  Int_t fFrtId;
82 
83  ClassDef(AliMpBusPatch,3) // The class collectiong electronics properties of DDL
84 };
85 
86 // inline functions
87 
89 inline Int_t AliMpBusPatch::GetId() const
90 { return fId; }
91 
93 inline Int_t AliMpBusPatch::GetDEId() const
94 { return fDEId; }
95 
97 inline Int_t AliMpBusPatch::GetDdlId() const
98 { return fDdlId; }
99 
101 inline Int_t AliMpBusPatch::GetFrtId() const
102 { return fFrtId; }
103 
105 inline Float_t AliMpBusPatch::GetCableLength() const
106 { return fCableLength; }
107 
109 inline void AliMpBusPatch::SetFrtId(Int_t id)
110 { fFrtId = id; }
111 
113 inline void AliMpBusPatch::SetCableLength(Float_t length)
114 { fCableLength = length; }
115 
117 inline TString AliMpBusPatch::GetCableLabel() const
118 { return fCableLabel; }
119 
121 inline void AliMpBusPatch::SetCableLabel(TString label)
122 { fCableLabel = label; }
123 
125 inline TString AliMpBusPatch::GetTranslatorLabel() const
126 { return fCableLabel; }
127 
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 
Int_t GetNofManus() const
void SetTranslatorLabel(TString label)
Set label of translator.
virtual ~AliMpBusPatch()
Int_t GetNofManusPerModule(Int_t patchModule) const
Bool_t HasManu(Int_t manuId) const
void SetCableLabel(TString label)
Set label of buspatch.
Float_t fCableLength
length of the buspatch cable
Definition: AliMpBusPatch.h:78
Int_t fId
Identifier (unique)
Definition: AliMpBusPatch.h:73
static const Int_t fgkOffset
Offset for conversion global/local ID.
Definition: AliMpBusPatch.h:70
Int_t fDdlId
DDL to which this bus patch is connected.
Definition: AliMpBusPatch.h:75
Int_t GetDEId() const
Return the Detection element Id.
Definition: AliMpBusPatch.h:93
Int_t GetManuId(Int_t index) const
Int_t fDEId
Detection element to which this bus patch is connected.
Definition: AliMpBusPatch.h:74
static Int_t GetGlobalBusID(Int_t localID, Int_t ddlID)
TString GetCableLabel() const
Return label of buspatch.
TString fCableLabel
label of the buspatch cable
Definition: AliMpBusPatch.h:79
Float_t GetCableLength() const
Return length of buspatch.
AliMpArrayI fManus
Manu Ids connected to this bus patch.
Definition: AliMpBusPatch.h:76
Int_t GetFrtId() const
Return the FRT Id.
Bool_t SetNofManusPerModule(Int_t manuNumber=0)
Int_t fFrtId
FRT Ids connected to this bus patch.
Definition: AliMpBusPatch.h:81
void SetCableLength(Float_t length)
Set length of buspatch.
Int_t GetDdlId() const
Return the Ddl Id.
Definition: AliMpBusPatch.h:97
TString GetTranslatorLabel() const
Return label of translator.
Int_t GetId() const
Return the unique Id.
Definition: AliMpBusPatch.h:89
Helper class for sorted integer array.
Definition: AliMpArrayI.h:21
TString fTranslatorLabel
label of the translator board
Definition: AliMpBusPatch.h:80
Int_t GetNofPatchModules() const
static Int_t GetLocalBusID(Int_t globalID, Int_t ddlID)
The class defines the properties of BusPatch.
Definition: AliMpBusPatch.h:21
AliMpBusPatch & operator=(const AliMpBusPatch &rhs)
Not implemented.
void SetFrtId(Int_t id)
Set FRT id for buspatch.
AliMpBusPatch()
Not implemented.
AliMpArrayI fNofManusPerModule
Nof Manus per patch modules (PCBs)
Definition: AliMpBusPatch.h:77
Bool_t AddManu(Int_t manuId)
TString GetFRTPosition() const
virtual void Print(Option_t *opt="") const