]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpBusPatch.h
Adding info abour Frt Crocus mapping:
[u/mrichter/AliRoot.git] / MUON / mapping / 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
58   private:
59     /// Not implemented
60     AliMpBusPatch();
61     /// Not implemented
62     AliMpBusPatch(const AliMpBusPatch& rhs);
63     /// Not implemented
64     AliMpBusPatch& operator=(const AliMpBusPatch& rhs);
65
66     // static data members      
67     static const Int_t  fgkOffset; ///< Offset for conversion global/local ID  
68
69     // data members     
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
79
80   ClassDef(AliMpBusPatch,3)  // The class collectiong electronics properties of DDL
81 };
82
83 // inline functions
84
85 /// Return the unique Id
86 inline Int_t AliMpBusPatch::GetId() const
87 {  return fId; }
88
89 /// Return the Detection element Id
90 inline Int_t AliMpBusPatch::GetDEId() const
91 {  return fDEId; }
92
93 /// Return the Ddl Id
94 inline Int_t AliMpBusPatch::GetDdlId() const
95 {  return fDdlId; }
96
97 /// Return the FRT Id
98 inline Int_t AliMpBusPatch::GetFrtId() const
99 {  return fFrtId; }
100
101 /// Return length of buspatch
102 inline Float_t  AliMpBusPatch::GetCableLength() const
103 { return fCableLength; }
104
105 /// Set FRT id for buspatch
106 inline void  AliMpBusPatch::SetFrtId(Int_t id)
107 { fFrtId = id; }
108
109 /// Set length of buspatch
110 inline void  AliMpBusPatch::SetCableLength(Float_t length)
111 { fCableLength = length; }
112
113 /// Return label of buspatch
114 inline TString  AliMpBusPatch::GetCableLabel() const
115 { return fCableLabel; }
116
117 /// Set label of buspatch
118 inline void  AliMpBusPatch::SetCableLabel(TString label)
119 { fCableLabel = label; }
120
121 /// Return label of translator
122 inline TString  AliMpBusPatch::GetTranslatorLabel() const
123 { return fCableLabel; }
124
125 /// Set label of translator
126 inline void  AliMpBusPatch::SetTranslatorLabel(TString label)
127 { fTranslatorLabel = label; }
128
129
130 #endif //ALI_BUS_PATCH_H
131
132
133
134
135
136
137
138
139
140
141
142
143
144