1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
7 /// \ingroup management
8 /// \class AliMpBusPatch
9 /// \brief The class defines the properties of BusPatch
11 /// \author Ivana Hrivnacova, IPN Orsay
13 #ifndef ALI_MP_BUS_PATCH_H
14 #define ALI_MP_BUS_PATCH_H
19 #include "AliMpArrayI.h"
21 class AliMpBusPatch : public TObject {
24 AliMpBusPatch(Int_t id, Int_t deId, Int_t ddlId);
25 AliMpBusPatch(TRootIOCtor* /*ioCtor*/);
26 virtual ~AliMpBusPatch();
29 static Int_t GetGlobalBusID(Int_t localID, Int_t ddlID);
30 static Int_t GetLocalBusID(Int_t globalID, Int_t ddlID);
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);
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;
51 Int_t GetNofPatchModules() const;
52 Int_t GetNofManusPerModule(Int_t patchModule) const;
54 Float_t GetCableLength() const;
55 TString GetCableLabel() const;
56 TString GetTranslatorLabel() const;
62 AliMpBusPatch(const AliMpBusPatch& rhs);
64 AliMpBusPatch& operator=(const AliMpBusPatch& rhs);
66 // static data members
67 static const Int_t fgkOffset; ///< Offset for conversion global/local ID
70 Int_t fId; ///< Identifier (unique)
71 Int_t fDEId; ///< Detection element to which this bus patch is connected
72 Int_t fDdlId; ///< DDL to which this bus patch is connected
73 AliMpArrayI fManus; ///< Manu Ids connected to this bus patch
74 AliMpArrayI fNofManusPerModule; ///< Nof Manus per patch modules (PCBs)
75 Float_t fCableLength; ///< length of the buspatch cable
76 TString fCableLabel; ///< label of the buspatch cable
77 TString fTranslatorLabel; ///< label of the translator board
78 Int_t fFrtId; ///< FRT Ids connected to this bus patch
80 ClassDef(AliMpBusPatch,3) // The class collectiong electronics properties of DDL
85 /// Return the unique Id
86 inline Int_t AliMpBusPatch::GetId() const
89 /// Return the Detection element Id
90 inline Int_t AliMpBusPatch::GetDEId() const
94 inline Int_t AliMpBusPatch::GetDdlId() const
98 inline Int_t AliMpBusPatch::GetFrtId() const
101 /// Return length of buspatch
102 inline Float_t AliMpBusPatch::GetCableLength() const
103 { return fCableLength; }
105 /// Set FRT id for buspatch
106 inline void AliMpBusPatch::SetFrtId(Int_t id)
109 /// Set length of buspatch
110 inline void AliMpBusPatch::SetCableLength(Float_t length)
111 { fCableLength = length; }
113 /// Return label of buspatch
114 inline TString AliMpBusPatch::GetCableLabel() const
115 { return fCableLabel; }
117 /// Set label of buspatch
118 inline void AliMpBusPatch::SetCableLabel(TString label)
119 { fCableLabel = label; }
121 /// Return label of translator
122 inline TString AliMpBusPatch::GetTranslatorLabel() const
123 { return fCableLabel; }
125 /// Set label of translator
126 inline void AliMpBusPatch::SetTranslatorLabel(TString label)
127 { fTranslatorLabel = label; }
130 #endif //ALI_BUS_PATCH_H