1 #ifndef ALI_MP_SEGMENTATION_H
2 #define ALI_MP_SEGMENTATION_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
8 // $MpId: AliMpSegmentation.h,v 1.7 2006/05/24 13:58:16 ivana Exp $
10 /// \ingroup management
11 /// \class AliMpSegmentation
12 /// \brief Singleton container class for mapping segmentations
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.
21 /// \author Ivana Hrivnacova, IPN Orsay; Laurent Aphecetche, SUBATECH
27 #ifndef ALI_MP_STRING_OBJ_MAP_H
28 # include "AliMpStringObjMap.h"
31 #ifndef ALI_MP_EX_MAP_H
32 # include "AliMpExMap.h"
35 #ifndef ALI_MP_CATHOD_TYPE_H
36 # include "AliMpCathodType.h"
39 #ifndef ALIMPSLATMOTIFMAP_H
40 # include "AliMpSlatMotifMap.h"
43 class AliMpVSegmentation;
44 class AliMpSegmentation;
47 class AliMpSegmentation : public TObject {
50 AliMpSegmentation(TRootIOCtor* /*ioCtor*/);
51 virtual ~AliMpSegmentation();
54 static AliMpSegmentation* Instance();
57 const AliMpVSegmentation* GetMpSegmentation(
58 Int_t detElemId, AliMp::CathodType cath,
59 Bool_t warn = true) const;
61 const AliMpVSegmentation* GetMpSegmentationByElectronics(
62 Int_t detElemId, Int_t elCardID,
63 Bool_t warn = true) const;
67 AliMpSegmentation(const AliMpSegmentation& rhs);
68 AliMpSegmentation& operator=(const AliMpSegmentation& rhs);
70 AliMpVSegmentation* CreateMpSegmentation(
71 Int_t detElemId, AliMp::CathodType cath);
73 AliMpExMap* FillElCardsMap(Int_t detElemId);
75 // static data members
76 static AliMpSegmentation* fgInstance; ///< Singleton instance
79 AliMpStringObjMap fMpSegmentations;///< Map of mapping segmentations to DE seg names
80 AliMpExMap fElCardsMap; ///< Map of el. cards IDs to segmentations
81 AliMpSlatMotifMap fSlatMotifMap; ///< Map of motif, motifTypes to avoid duplications and allow proper deletion
83 ClassDef(AliMpSegmentation,1) // The factory for building mapping segmentations
86 #endif //ALI_MP_SEGMENTATION_H