]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/mapping/AliMpBusPatch.h
In Mapping/macros:
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpBusPatch.h
CommitLineData
1e738c3c 1/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
3
4// $Id$
b4daf0b2 5// $MpId: $
1e738c3c 6
9b97f64e 7/// \ingroup management
1e738c3c 8/// \class AliMpBusPatch
b4daf0b2 9/// \brief The class defines the properties of BusPatch
1e738c3c 10///
b4daf0b2 11/// \author Ivana Hrivnacova, IPN Orsay
1e738c3c 12
b4daf0b2 13#ifndef ALI_MP_BUS_PATCH_H
14#define ALI_MP_BUS_PATCH_H
1e738c3c 15
1e738c3c 16#include <TObject.h>
59754717 17#include <TString.h>
1e738c3c 18
b4daf0b2 19#include "AliMpArrayI.h"
20
21class 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);
bf4bf8d2 34 Bool_t SetNofManusPerModule(Int_t manuNumber = 0);
59754717 35 void SetTranslatorLabel(TString label);
36 void SetCableLabel(TString label);
bf4bf8d2 37 void SetCableLength(Float_t length);
59754717 38 void SetFrtId(Int_t id);
ae649dcb 39 void RevertReadout();
40 void ResetReadout();
41
b4daf0b2 42 // get methods
43 Int_t GetId() const;
44 Int_t GetDEId() const;
45 Int_t GetDdlId() const;
59754717 46 Int_t GetFrtId() const;
b4daf0b2 47 Int_t GetNofManus() const;
48 Int_t GetManuId(Int_t index) const;
49 Bool_t HasManu(Int_t manuId) const;
50
f00f5bb0 51 Int_t GetNofPatchModules() const;
52 Int_t GetNofManusPerModule(Int_t patchModule) const;
53
bf4bf8d2 54 Float_t GetCableLength() const;
59754717 55 TString GetCableLabel() const;
56 TString GetTranslatorLabel() const;
6a7424c4 57 TString GetFRTPosition() const;
58
59 virtual void Print(Option_t* opt="") const;
60
b4daf0b2 61 private:
71a2d3aa 62 /// Not implemented
b4daf0b2 63 AliMpBusPatch();
71a2d3aa 64 /// Not implemented
b4daf0b2 65 AliMpBusPatch(const AliMpBusPatch& rhs);
71a2d3aa 66 /// Not implemented
b4daf0b2 67 AliMpBusPatch& operator=(const AliMpBusPatch& rhs);
68
69 // static data members
71a2d3aa 70 static const Int_t fgkOffset; ///< Offset for conversion global/local ID
b4daf0b2 71
72 // data members
59754717 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
b4daf0b2 84};
85
86// inline functions
2a7ea2e6 87
b4daf0b2 88/// Return the unique Id
89inline Int_t AliMpBusPatch::GetId() const
90{ return fId; }
91
92/// Return the Detection element Id
93inline Int_t AliMpBusPatch::GetDEId() const
94{ return fDEId; }
95
59754717 96/// Return the Ddl Id
b4daf0b2 97inline Int_t AliMpBusPatch::GetDdlId() const
98{ return fDdlId; }
99
59754717 100/// Return the FRT Id
101inline Int_t AliMpBusPatch::GetFrtId() const
102{ return fFrtId; }
103
bf4bf8d2 104/// Return length of buspatch
105inline Float_t AliMpBusPatch::GetCableLength() const
106{ return fCableLength; }
107
59754717 108/// Set FRT id for buspatch
109inline void AliMpBusPatch::SetFrtId(Int_t id)
110{ fFrtId = id; }
111
bf4bf8d2 112/// Set length of buspatch
113inline void AliMpBusPatch::SetCableLength(Float_t length)
114{ fCableLength = length; }
115
59754717 116/// Return label of buspatch
117inline TString AliMpBusPatch::GetCableLabel() const
118{ return fCableLabel; }
119
120/// Set label of buspatch
121inline void AliMpBusPatch::SetCableLabel(TString label)
122{ fCableLabel = label; }
123
124/// Return label of translator
125inline TString AliMpBusPatch::GetTranslatorLabel() const
126{ return fCableLabel; }
127
128/// Set label of translator
129inline void AliMpBusPatch::SetTranslatorLabel(TString label)
130{ fTranslatorLabel = label; }
131
132
b4daf0b2 133#endif //ALI_BUS_PATCH_H
528df1a6 134
1e738c3c 135
1e738c3c 136
1e738c3c 137
1e738c3c 138
1e738c3c 139
1e738c3c 140
d2892ef5 141
1e738c3c 142
5826f1df 143
5826f1df 144
1e738c3c 145
1e738c3c 146
147