]>
Commit | Line | Data |
---|---|---|
69417637 | 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 | |
f3ed9a44 | 15 | /// AliMpVSegmentation interface and to segmentations underlying |
16 | /// detectors (sector, slat, trigger). \n | |
69417637 | 17 | /// Mapping segmentations for all detection elements |
18 | /// are created at the first call to AliMpSegmentation::Instance(). | |
19 | /// The class is a singleton, it has all constructors | |
20 | /// private, except for the special constructor for Root I/O. | |
21 | /// | |
22 | /// \author Ivana Hrivnacova, IPN Orsay; Laurent Aphecetche, SUBATECH | |
23 | ||
24 | #ifndef ROOT_TObject | |
25 | # include <TObject.h> | |
26 | #endif | |
27 | ||
28 | #ifndef ALI_MP_STRING_OBJ_MAP_H | |
29 | # include "AliMpStringObjMap.h" | |
30 | #endif | |
31 | ||
32 | #ifndef ALI_MP_EX_MAP_H | |
33 | # include "AliMpExMap.h" | |
34 | #endif | |
35 | ||
cddd101e | 36 | #ifndef ALI_MP_CATHOD_TYPE_H |
37 | # include "AliMpCathodType.h" | |
38 | #endif | |
39 | ||
24f9bd97 | 40 | class AliMpDEStore; |
69417637 | 41 | class AliMpSegmentation; |
50ba5978 | 42 | class AliMpVSegmentation; |
dede1525 | 43 | class AliMpSlatMotifMap; |
ab167304 | 44 | class AliMpDataStreams; |
f3ed9a44 | 45 | class AliMpSector; |
46 | class AliMpSlat; | |
47 | class AliMpTrigger; | |
69417637 | 48 | class TRootIOCtor; |
49 | ||
b80faac0 | 50 | using std::ofstream; |
51 | ||
69417637 | 52 | class AliMpSegmentation : public TObject { |
53 | ||
54 | public: | |
7d5d0cc5 | 55 | AliMpSegmentation(TRootIOCtor* ioCtor); |
69417637 | 56 | virtual ~AliMpSegmentation(); |
57 | ||
58 | // static methods | |
5f377a9a | 59 | static AliMpSegmentation* Instance(Bool_t warn = true); |
ab167304 | 60 | static AliMpSegmentation* ReadData(const AliMpDataStreams& dataStreams, |
d2d10ee1 | 61 | Bool_t warn = true); |
69417637 | 62 | |
63 | // methods | |
f3ed9a44 | 64 | |
65 | // | |
66 | // Access to segmentations | |
67 | // | |
68 | ||
69417637 | 69 | const AliMpVSegmentation* GetMpSegmentation( |
cddd101e | 70 | Int_t detElemId, AliMp::CathodType cath, |
69417637 | 71 | Bool_t warn = true) const; |
72 | ||
73 | const AliMpVSegmentation* GetMpSegmentationByElectronics( | |
74 | Int_t detElemId, Int_t elCardID, | |
75 | Bool_t warn = true) const; | |
f3ed9a44 | 76 | // |
77 | // Access to sectors, slats, triggers | |
78 | // | |
79 | ||
80 | const AliMpSector* GetSector(const AliMpVSegmentation* kSegmentation, | |
81 | Bool_t warn = true) const; | |
82 | const AliMpSector* GetSector(Int_t detElemId, AliMp::CathodType cath, | |
83 | Bool_t warn = true) const; | |
84 | const AliMpSector* GetSectorByElectronics(Int_t detElemId, Int_t elCardID, | |
85 | Bool_t warn = true) const; | |
86 | ||
87 | const AliMpSlat* GetSlat(const AliMpVSegmentation* kSegmentation, | |
88 | Bool_t warn = true) const; | |
89 | const AliMpSlat* GetSlat(Int_t detElemId, AliMp::CathodType cath, | |
90 | Bool_t warn = true) const; | |
91 | const AliMpSlat* GetSlatByElectronics(Int_t detElemId, Int_t elCardID, | |
92 | Bool_t warn = true) const; | |
93 | ||
94 | const AliMpTrigger* GetTrigger(const AliMpVSegmentation* kSegmentation, | |
95 | Bool_t warn = true) const; | |
96 | const AliMpTrigger* GetTrigger(Int_t detElemId, AliMp::CathodType cath, | |
97 | Bool_t warn = true) const; | |
98 | const AliMpTrigger* GetTriggerByElectronics(Int_t detElemId, Int_t elCardID, | |
99 | Bool_t warn = true) const; | |
100 | ||
69417637 | 101 | private: |
ab167304 | 102 | AliMpSegmentation(const AliMpDataStreams& dataStreams); |
f5671fc3 | 103 | /// Not implemented |
69417637 | 104 | AliMpSegmentation(const AliMpSegmentation& rhs); |
f5671fc3 | 105 | /// Not implemented |
69417637 | 106 | AliMpSegmentation& operator=(const AliMpSegmentation& rhs); |
107 | ||
108 | AliMpVSegmentation* CreateMpSegmentation( | |
21027e5a | 109 | const AliMpDataStreams& dataStreams, |
cddd101e | 110 | Int_t detElemId, AliMp::CathodType cath); |
f3ed9a44 | 111 | |
69417637 | 112 | |
113 | AliMpExMap* FillElCardsMap(Int_t detElemId); | |
114 | ||
115 | // static data members | |
116 | static AliMpSegmentation* fgInstance; ///< Singleton instance | |
117 | ||
118 | // data members | |
24f9bd97 | 119 | AliMpDEStore* fDetElements; ///< Detection element store |
ae505e9f | 120 | AliMpStringObjMap fMpSegmentations;///< Map of mapping segmentations to DE seg names |
69417637 | 121 | AliMpExMap fElCardsMap; ///< Map of el. cards IDs to segmentations |
ab167304 | 122 | AliMpSlatMotifMap* fSlatMotifMap; ///< Map of motif, motifTypes to avoid duplications and allow proper deletion |
69417637 | 123 | |
183279c1 | 124 | ClassDef(AliMpSegmentation,3) // The factory for building mapping segmentations |
69417637 | 125 | }; |
126 | ||
127 | #endif //ALI_MP_SEGMENTATION_H | |
128 | ||
129 | ||
130 | ||
131 | ||
132 | ||
133 | ||
134 | ||
135 | ||
136 | ||
137 | ||
138 | ||
139 | ||
140 | ||
141 | ||
142 |