]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpDetElement.h
Hopefully sorting out the local board id versus index problems once for all...
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpDetElement.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: AliMpDetElement.h,v 1.6 2006/05/24 13:58:16 ivana Exp $ 
6
7 /// \ingroup management
8 /// \class AliMpDetElement
9 /// \brief The class defines the electronics properties of detection element
10 ///
11 /// \author Ivana Hrivnacova, IPN Orsay;
12 ///         Laurent Aphecetche, Ch. Finck, Subatech Nantes
13
14 #ifndef ALI_MP_DET_ELEMENT_H
15 #define ALI_MP_DET_ELEMENT_H
16
17 #include <TObject.h>
18 #include <TArrayI.h>
19 #include <TExMap.h>
20
21 #include "AliMpArrayI.h"
22 #include "AliMpStationType.h"
23 #include "AliMpPlaneType.h"
24 #include "AliMpCathodType.h"
25
26 #ifndef ALI_MP_EX_MAP_H
27 #  include "AliMpExMap.h"
28 #endif
29
30 class AliMpVSegmentation;
31 class AliMpArrayI;
32
33 class AliMpDetElement : public  TObject {
34
35   public:  
36     AliMpDetElement(Int_t id, const TString& name,
37                     const TString& segType, AliMp::PlaneType planeType);
38     AliMpDetElement(TRootIOCtor* /*ioCtor*/);
39     virtual ~AliMpDetElement();
40
41     // static methods
42     static char GetNameSeparator(); 
43     
44     // methods
45     Bool_t AddBusPatch(Int_t busPatchId); 
46     void   AddManu(Int_t manuId);
47     void   SetDdlId(Int_t ddlId);
48
49     // get methods
50     Int_t   GetId() const;
51     Int_t   GetDdlId() const;
52     TString GetDEName() const;
53     TString GetSegType() const;
54     TString GetSegName(AliMp::CathodType cath) const;
55
56     AliMp::PlaneType   GetPlaneType(AliMp::CathodType cath) const;
57     AliMp::CathodType  GetCathodType(AliMp::PlaneType planeType) const;
58     AliMp::CathodType  GetCathodTypeFromManuId(Int_t manuId) const;
59     AliMp::StationType GetStationType() const;
60     
61     Int_t  GetNofBusPatches() const;
62     Int_t  GetBusPatchId(Int_t index) const;
63     Bool_t HasBusPatchId(Int_t busPatchId) const;
64
65     Int_t  NofManus() const;
66     Int_t  NofChannelsInManu(Int_t manuId) const;
67     Bool_t IsExistingChannel(Int_t manuId, Int_t manuChannel) const;
68     Bool_t IsConnectedChannel(Int_t manuId, Int_t manuChannel) const;
69     
70     const AliMpArrayI* ManusForHV(Int_t hvIndex) const;
71     
72            /// Return the number of channels in this detection element    
73     Int_t NofChannels() const { return fNofChannels; }
74     
75   private:
76     /// Not implemented
77     AliMpDetElement();
78     /// Not implemented
79     AliMpDetElement(const AliMpDetElement& rhs);
80     /// Not implemented
81     AliMpDetElement& operator=(const AliMpDetElement& rhs);
82
83     // static data members      
84     static const char  fgkNameSeparator; ///< Separator character used in DE names
85
86     // data members     
87     Int_t          fId;         ///< Identifier (unique)
88     Int_t          fDdlId;      ///< DDL Id to which this DE is connected
89     TString        fName;       ///< Name unique
90     TString        fSegType;    ///< Segmentation type name
91     AliMp::PlaneType fPlaneType;  ///< Plane type on cathod0
92     //AliMpExMap     fBusPatches; ///< Bus patches connected to this detection element
93     AliMpArrayI    fBusPatchIds;  ///< Bus patches connected to this detection element
94     
95     mutable TExMap fManuList;  ///< map of manus
96     mutable TExMap fTrackerChannels; ///< list of connected pads (tracker only)
97     
98     AliMpExMap fHVmanus; ///< map of HV->manu
99     
100     Int_t fNofChannels; ///< number of channels in this detection element
101     
102   ClassDef(AliMpDetElement,4)  // The manager class for definition of detection element types
103 };
104
105 // inline function
106
107 /// Return the name separator
108 inline  char AliMpDetElement::GetNameSeparator()
109 { return fgkNameSeparator; }  
110
111 /// Set DDL Id
112 inline  void AliMpDetElement::SetDdlId(Int_t ddlId)
113 { fDdlId = ddlId; }
114
115 /// Return Id
116 inline  Int_t   AliMpDetElement::GetId() const
117 { return fId; }
118
119 /// Return DDL Id
120 inline  Int_t   AliMpDetElement::GetDdlId() const
121 { return fDdlId; }
122
123 /// Return name
124 inline  TString AliMpDetElement::GetDEName() const
125 { return fName; }
126
127 /// Return segmentation type name
128 inline  TString AliMpDetElement::GetSegType() const
129 { return fSegType; }
130
131 #endif //ALI_MP_MANAGER_H
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146