]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpSegmentation.h
In Print(): added an option to print area borders
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpSegmentation.h
1 #ifndef ALI_MP_SEGMENTATION_H
2 #define ALI_MP_SEGMENTATION_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 // $Id$ 
8 // $MpId: AliMpSegmentation.h,v 1.7 2006/05/24 13:58:16 ivana Exp $ 
9
10 /// \ingroup management
11 /// \class AliMpSegmentation
12 /// \brief Singleton container class for mapping segmentations
13 ///
14 /// It provides access to mapping segmentations based on the
15 /// AliMpVSegmentation interface.                                        \n
16 /// Mapping segmentations for all detection elements
17 /// are created at the first call to AliMpSegmentation::Instance().
18 /// The class is a singleton, it has all constructors
19 /// private, except for the special constructor for Root I/O.
20 ///
21 /// \author Ivana Hrivnacova, IPN Orsay; Laurent Aphecetche, SUBATECH
22
23 #ifndef ROOT_TObject
24 #  include <TObject.h>
25 #endif
26
27 #ifndef ALI_MP_STRING_OBJ_MAP_H
28 #  include "AliMpStringObjMap.h"
29 #endif
30
31 #ifndef ALI_MP_EX_MAP_H
32 #  include "AliMpExMap.h"
33 #endif
34
35 #ifndef ALI_MP_CATHOD_TYPE_H
36 #  include "AliMpCathodType.h"
37 #endif
38
39 #ifndef ALIMPSLATMOTIFMAP_H
40 #  include "AliMpSlatMotifMap.h"
41 #endif
42
43 class AliMpDEStore;
44 class AliMpVSegmentation;
45 class AliMpSegmentation;
46 class TRootIOCtor;
47
48 class AliMpSegmentation : public  TObject {
49
50   public:
51     AliMpSegmentation(TRootIOCtor* /*ioCtor*/);
52     virtual ~AliMpSegmentation();
53     
54     // static methods
55     static AliMpSegmentation* Instance(Bool_t warn = true);
56     static AliMpSegmentation* ReadData(Bool_t warn = true);
57
58     // methods
59     const AliMpVSegmentation* GetMpSegmentation(
60                                  Int_t detElemId, AliMp::CathodType cath, 
61                                  Bool_t warn = true) const;
62
63     const AliMpVSegmentation* GetMpSegmentationByElectronics(
64                                  Int_t detElemId, Int_t elCardID, 
65                                  Bool_t warn = true) const;
66     
67   private:
68     /// Not implemented
69     AliMpSegmentation();
70     /// Not implemented
71     AliMpSegmentation(const AliMpSegmentation& rhs);
72     /// Not implemented
73     AliMpSegmentation& operator=(const AliMpSegmentation& rhs);
74
75     AliMpVSegmentation* CreateMpSegmentation(
76                               Int_t detElemId, AliMp::CathodType cath);
77
78     AliMpExMap* FillElCardsMap(Int_t detElemId);
79
80     // static data members
81     static AliMpSegmentation* fgInstance; ///< Singleton instance
82
83     // data members
84     AliMpDEStore*      fDetElements;    ///< Detection element store
85     AliMpStringObjMap  fMpSegmentations;///< Map of mapping segmentations to DE seg names
86     AliMpExMap         fElCardsMap;     ///< Map of el. cards IDs to segmentations
87     AliMpSlatMotifMap  fSlatMotifMap; ///< Map of motif, motifTypes to avoid duplications and allow proper deletion
88     
89   ClassDef(AliMpSegmentation,1)  // The factory for building mapping segmentations
90 };
91
92 #endif //ALI_MP_SEGMENTATION_H
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107