]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/mapping/AliMpDetElement.h
In SetNofManusPerModule(): return false if no action
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpDetElement.h
CommitLineData
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
26class AliMpVSegmentation;
27
28class 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::StationType GetStationType() const;
54
55 Int_t GetNofBusPatches() const;
56 Int_t GetBusPatchId(Int_t index) const;
57 Bool_t HasBusPatchId(Int_t busPatchId) const;
58
59 Int_t GetNofManus() const;
60 Int_t GetManuSerialFromId(Int_t manuId) const;
61 Int_t GetManuIdFromSerial(Int_t serialNb) const;
62
63 private:
71a2d3aa 64 /// Not implemented
f0c62051 65 AliMpDetElement();
71a2d3aa 66 /// Not implemented
f0c62051 67 AliMpDetElement(const AliMpDetElement& rhs);
71a2d3aa 68 /// Not implemented
f0c62051 69 AliMpDetElement& operator=(const AliMpDetElement& rhs);
70
71 // static data members
72 static const char fgkNameSeparator; ///< Separator character used in DE names
73
74 // data members
75 Int_t fId; ///< Identifier (unique)
76 Int_t fDdlId; ///< DDL Id to which this DE is connected
77 TString fName; ///< Name unique
78 TString fSegType; ///< Segmentation type name
79 AliMp::PlaneType fPlaneType; ///< Plane type on cathod0
80 //AliMpExMap fBusPatches; ///< Bus patches connected to this detection element
81 AliMpArrayI fBusPatchIds; ///< Bus patches connected to this detection element
71a2d3aa 82 mutable TExMap fManuToSerialNbs; ///< Map from manuId to serial #
83 mutable TExMap fSerialNbToManus; ///< Map manu serial # to manuId
f0c62051 84
85 ClassDef(AliMpDetElement,1) // The manager class for definition of detection element types
86};
87
88// inline function
89
90/// Return the name separator
91inline char AliMpDetElement::GetNameSeparator()
92{ return fgkNameSeparator; }
93
94/// Set DDL Id
95inline void AliMpDetElement::SetDdlId(Int_t ddlId)
96{ fDdlId = ddlId; }
97
98/// Return Id
99inline Int_t AliMpDetElement::GetId() const
100{ return fId; }
101
102/// Return DDL Id
103inline Int_t AliMpDetElement::GetDdlId() const
104{ return fDdlId; }
105
106/// Return name
107inline TString AliMpDetElement::GetDEName() const
108{ return fName; }
109
110/// Return segmentation type name
111inline TString AliMpDetElement::GetSegType() const
112{ return fSegType; }
113
114#endif //ALI_MP_MANAGER_H
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129