]>
Commit | Line | Data |
---|---|---|
f0c62051 | 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 | ||
61845859 | 26 | #ifndef ALI_MP_EX_MAP_H |
27 | # include "AliMpExMap.h" | |
28 | #endif | |
29 | ||
f0c62051 | 30 | class AliMpVSegmentation; |
61845859 | 31 | class AliMpArrayI; |
f0c62051 | 32 | |
33 | class AliMpDetElement : public TObject { | |
34 | ||
61845859 | 35 | public: |
f0c62051 | 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 AddManuSerial(Int_t manuId, Int_t serialNb); | |
61845859 | 47 | void AddManu(Int_t manuId); |
f0c62051 | 48 | void SetDdlId(Int_t ddlId); |
49 | ||
50 | // get methods | |
51 | Int_t GetId() const; | |
52 | Int_t GetDdlId() const; | |
53 | TString GetDEName() const; | |
54 | TString GetSegType() const; | |
55 | TString GetSegName(AliMp::CathodType cath) const; | |
56 | ||
57 | AliMp::PlaneType GetPlaneType(AliMp::CathodType cath) const; | |
58 | AliMp::CathodType GetCathodType(AliMp::PlaneType planeType) const; | |
969fa94b | 59 | AliMp::CathodType GetCathodTypeFromManuId(Int_t manuId) const; |
f0c62051 | 60 | AliMp::StationType GetStationType() const; |
61 | ||
62 | Int_t GetNofBusPatches() const; | |
63 | Int_t GetBusPatchId(Int_t index) const; | |
64 | Bool_t HasBusPatchId(Int_t busPatchId) const; | |
65 | ||
61845859 | 66 | Int_t NofManusWithSerialNumber() const; |
f0c62051 | 67 | Int_t GetManuSerialFromId(Int_t manuId) const; |
68 | Int_t GetManuIdFromSerial(Int_t serialNb) const; | |
69 | ||
61845859 | 70 | Int_t NofManus() const; |
71 | Int_t NofChannelsInManu(Int_t manuId) const; | |
72 | Bool_t IsExistingChannel(Int_t manuId, Int_t manuChannel) const; | |
73 | Bool_t IsConnectedChannel(Int_t manuId, Int_t manuChannel) const; | |
74 | ||
75 | const AliMpArrayI* ManusForHV(Int_t hvIndex) const; | |
969fa94b | 76 | |
630711ed | 77 | /// Return the number of channels in this detection element |
78 | Int_t NofChannels() const { return fNofChannels; } | |
79 | ||
f0c62051 | 80 | private: |
71a2d3aa | 81 | /// Not implemented |
f0c62051 | 82 | AliMpDetElement(); |
71a2d3aa | 83 | /// Not implemented |
f0c62051 | 84 | AliMpDetElement(const AliMpDetElement& rhs); |
71a2d3aa | 85 | /// Not implemented |
f0c62051 | 86 | AliMpDetElement& operator=(const AliMpDetElement& rhs); |
87 | ||
88 | // static data members | |
89 | static const char fgkNameSeparator; ///< Separator character used in DE names | |
90 | ||
91 | // data members | |
92 | Int_t fId; ///< Identifier (unique) | |
93 | Int_t fDdlId; ///< DDL Id to which this DE is connected | |
94 | TString fName; ///< Name unique | |
95 | TString fSegType; ///< Segmentation type name | |
96 | AliMp::PlaneType fPlaneType; ///< Plane type on cathod0 | |
97 | //AliMpExMap fBusPatches; ///< Bus patches connected to this detection element | |
98 | AliMpArrayI fBusPatchIds; ///< Bus patches connected to this detection element | |
71a2d3aa | 99 | mutable TExMap fManuToSerialNbs; ///< Map from manuId to serial # |
100 | mutable TExMap fSerialNbToManus; ///< Map manu serial # to manuId | |
61845859 | 101 | |
102 | mutable TExMap fManuList; ///< map of manus | |
103 | mutable TExMap fTrackerChannels; ///< list of connected pads (tracker only) | |
104 | ||
105 | AliMpExMap fHVmanus; ///< map of HV->manu | |
106 | ||
630711ed | 107 | Int_t fNofChannels; ///< number of channels in this detection element |
108 | ||
109 | ClassDef(AliMpDetElement,3) // The manager class for definition of detection element types | |
f0c62051 | 110 | }; |
111 | ||
112 | // inline function | |
113 | ||
114 | /// Return the name separator | |
115 | inline char AliMpDetElement::GetNameSeparator() | |
116 | { return fgkNameSeparator; } | |
117 | ||
118 | /// Set DDL Id | |
119 | inline void AliMpDetElement::SetDdlId(Int_t ddlId) | |
120 | { fDdlId = ddlId; } | |
121 | ||
122 | /// Return Id | |
123 | inline Int_t AliMpDetElement::GetId() const | |
124 | { return fId; } | |
125 | ||
126 | /// Return DDL Id | |
127 | inline Int_t AliMpDetElement::GetDdlId() const | |
128 | { return fDdlId; } | |
129 | ||
130 | /// Return name | |
131 | inline TString AliMpDetElement::GetDEName() const | |
132 | { return fName; } | |
133 | ||
134 | /// Return segmentation type name | |
135 | inline TString AliMpDetElement::GetSegType() const | |
136 | { return fSegType; } | |
137 | ||
138 | #endif //ALI_MP_MANAGER_H | |
139 | ||
140 | ||
141 | ||
142 | ||
143 | ||
144 | ||
145 | ||
146 | ||
147 | ||
148 | ||
149 | ||
150 | ||
151 | ||
152 | ||
153 |