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