]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpDetElement.h
Addung a method GetCathodTypeFromManuId (Laurent)
[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 class AliMpVSegmentation;
27
28 class AliMpDetElement : public  TObject {
29
30   public:
31     AliMpDetElement(Int_t id, const TString& name,
32                     const TString& segType, AliMp::PlaneType planeType);
33     AliMpDetElement(TRootIOCtor* /*ioCtor*/);
34     virtual ~AliMpDetElement();
35
36     // static methods
37     static char GetNameSeparator(); 
38     
39     // methods
40     Bool_t AddBusPatch(Int_t busPatchId); 
41     void   AddManuSerial(Int_t manuId, Int_t serialNb); 
42     void   SetDdlId(Int_t ddlId);
43
44     // get methods
45     Int_t   GetId() const;
46     Int_t   GetDdlId() const;
47     TString GetDEName() const;
48     TString GetSegType() const;
49     TString GetSegName(AliMp::CathodType cath) const;
50
51     AliMp::PlaneType   GetPlaneType(AliMp::CathodType cath) const;
52     AliMp::CathodType  GetCathodType(AliMp::PlaneType planeType) const;
53     AliMp::CathodType  GetCathodTypeFromManuId(Int_t manuId) const;
54     AliMp::StationType GetStationType() const;
55     
56     Int_t  GetNofBusPatches() const;
57     Int_t  GetBusPatchId(Int_t index) const;
58     Bool_t HasBusPatchId(Int_t busPatchId) const;
59     
60     Int_t  GetNofManus() const;    
61     Int_t  GetManuSerialFromId(Int_t manuId) const;
62     Int_t  GetManuIdFromSerial(Int_t serialNb) const;
63
64     
65   private:
66     /// Not implemented
67     AliMpDetElement();
68     /// Not implemented
69     AliMpDetElement(const AliMpDetElement& rhs);
70     /// Not implemented
71     AliMpDetElement& operator=(const AliMpDetElement& rhs);
72
73     // static data members      
74     static const char  fgkNameSeparator; ///< Separator character used in DE names
75
76     // data members     
77     Int_t          fId;         ///< Identifier (unique)
78     Int_t          fDdlId;      ///< DDL Id to which this DE is connected
79     TString        fName;       ///< Name unique
80     TString        fSegType;    ///< Segmentation type name
81     AliMp::PlaneType fPlaneType;  ///< Plane type on cathod0
82     //AliMpExMap     fBusPatches; ///< Bus patches connected to this detection element
83     AliMpArrayI    fBusPatchIds;  ///< Bus patches connected to this detection element
84     mutable TExMap fManuToSerialNbs; ///< Map from manuId to serial #   
85     mutable TExMap fSerialNbToManus; ///< Map manu serial # to manuId
86      
87   ClassDef(AliMpDetElement,1)  // The manager class for definition of detection element types
88 };
89
90 // inline function
91
92 /// Return the name separator
93 inline  char AliMpDetElement::GetNameSeparator()
94 { return fgkNameSeparator; }  
95
96 /// Set DDL Id
97 inline  void AliMpDetElement::SetDdlId(Int_t ddlId)
98 { fDdlId = ddlId; }
99
100 /// Return Id
101 inline  Int_t   AliMpDetElement::GetId() const
102 { return fId; }
103
104 /// Return DDL Id
105 inline  Int_t   AliMpDetElement::GetDdlId() const
106 { return fDdlId; }
107
108 /// Return name
109 inline  TString AliMpDetElement::GetDEName() const
110 { return fName; }
111
112 /// Return segmentation type name
113 inline  TString AliMpDetElement::GetSegType() const
114 { return fSegType; }
115
116 #endif //ALI_MP_MANAGER_H
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131