]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/mapping/AliMpSegmentation.h
AliMpSegFactory replaced with AliMpSegmentation
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpSegmentation.h
CommitLineData
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
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
35class AliMpVSegmentation;
36class AliMpSegmentation;
37
38class TRootIOCtor;
39
40class AliMpSegmentation : public TObject {
41
42 public:
43 AliMpSegmentation(TRootIOCtor* /*ioCtor*/);
44 virtual ~AliMpSegmentation();
45
46 // static methods
47 static AliMpSegmentation* Instance();
48
49 // methods
50 const AliMpVSegmentation* GetMpSegmentation(
51 Int_t detElemId, Int_t cath,
52 Bool_t warn = true) const;
53
54 const AliMpVSegmentation* GetMpSegmentationByElectronics(
55 Int_t detElemId, Int_t elCardID,
56 Bool_t warn = true) const;
57
58 private:
59 AliMpSegmentation();
60 AliMpSegmentation(const AliMpSegmentation& rhs);
61 AliMpSegmentation& operator=(const AliMpSegmentation& rhs);
62
63 AliMpVSegmentation* CreateMpSegmentation(
64 Int_t detElemId, Int_t cath);
65
66 AliMpExMap* FillElCardsMap(Int_t detElemId);
67
68 // static data members
69 static AliMpSegmentation* fgInstance; ///< Singleton instance
70
71 // data members
72 AliMpStringObjMap fMpSegmentations;///< Map of mapping segmentations to DE names
73 AliMpExMap fElCardsMap; ///< Map of el. cards IDs to segmentations
74
75
76 ClassDef(AliMpSegmentation,1) // The factory for building mapping segmentations
77};
78
79#endif //ALI_MP_SEGMENTATION_H
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94