]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpDEManager.h
Adding a GetCathod(Int_t detElemId, AliMpPlaneType planeType) method
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpDEManager.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
6 /// \ingroup management
7 /// \class AliMpDEManager
8 /// \brief The manager class for definition of detection element types
9 //
10 /// The detection element types are defined via unique names
11 /// in denames.dat file for each station in the mapping data.
12 /// Detection element name is composed of DETypeName and planeTypeName.
13 /// DETypeName is only one per station in case of station1 and 2 quadrants, 
14 /// there are more DETypes in case of slat and trigger stations. 
15 ///
16 /// Authors: Ivana Hrivnacova, IPN Orsay
17 ///          Laurent Aphecetche, SUBATECH Nantes
18
19 #ifndef ALI_MP_DE_MANAGER_H
20 #define ALI_MP_DE_MANAGER_H
21
22 #include "AliMpExMap.h"
23 #include "AliMpPlaneType.h"
24 #include "AliMpStationType.h"
25
26 #include <TObject.h>
27
28 class AliMpVSegmentation;
29
30 class AliMpDEManager : public  TObject {
31
32   public:
33     virtual ~AliMpDEManager();
34     
35     // methods
36     static Bool_t IsValidDetElemId(Int_t detElemId, Bool_t warn = false);
37     static Bool_t IsValidCathod(Int_t cath, Bool_t warn = false);
38     static Bool_t IsValid(Int_t detElemId, Int_t cath, Bool_t warn = false);
39     static Bool_t IsValidModuleId(Int_t moduleId, Bool_t warn = false);
40
41     static TString GetDEName(Int_t detElemId, Int_t cath, Bool_t warn = true);
42     static TString GetDETypeName(Int_t detElemId, Int_t cath, Bool_t warn = true);
43     static Int_t   GetModuleId(Int_t detElemId, Bool_t warn = true);    
44     static AliMpPlaneType   GetPlaneType(Int_t detElemId, Int_t cath);
45     static AliMpStationType GetStationType(Int_t detElemId);
46     static Int_t            GetCathod(Int_t detElemId, AliMpPlaneType planeType);
47
48   protected:
49     AliMpDEManager();
50     AliMpDEManager(const AliMpDEManager& rhs);
51     AliMpDEManager& operator=(const AliMpDEManager& rhs);
52
53   private:
54     // methods
55     static Bool_t IsPlaneType(const TString& planeTypeName);
56     static AliMpPlaneType   PlaneType(const TString& planeTypeName);
57     static AliMpStationType StationType(const TString& stationTypeName);
58
59     static Bool_t ReadDENames(AliMpStationType station);
60     static void   FillDENames();
61
62     // static data members      
63     static const char  fgkNameSeparator; // Separator character used in DE names
64     static const char  fgkCommentPrefix; // Comment prefix in DE names file
65     static const Int_t fgkCoefficient;   // Coefficient used in DE Id <-> station
66
67     // data members     
68     static  AliMpExMap fgDENamesMap;  // Map between DE Ids and 
69                                       // a pair of DE names for 2 cathods
70     static  AliMpExMap fgDECathBNBMap;// Map between DE Is and a pair
71                                       // of planeTypes for cathodes (0,1)
72
73   ClassDef(AliMpDEManager,0)  // 
74 };
75
76 #endif //ALI_MP_MANAGER_H
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91