]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpDEStore.h
Coding conventions
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpDEStore.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: AliMpDEStore.h,v 1.6 2006/05/24 13:58:16 ivana Exp $ 
6
7 /// \ingroup management
8 /// \class AliMpDEStore
9 /// \brief The container class for detection element objects
10 ///
11 /// \author Ivana Hrivnacova, IPN Orsay;
12 ///         Laurent Aphecetche, Christian Finck, SUBATECH Nantes
13
14 #ifndef ALI_MP_DE_STORE_H
15 #define ALI_MP_DE_STORE_H
16
17 #include <TObject.h>
18 #include <TArrayI.h>
19
20 #include "AliMpExMap.h"
21 #include "AliMpPlaneType.h"
22 #include "AliMpStationType.h"
23 #include "AliMpStation12Type.h"
24 #include "AliMpIntPair.h"
25
26 class AliMpDetElement;
27 class AliMpDataStreams;
28 class TString;
29
30 class AliMpDEStore : public  TObject {
31
32   friend class AliMpDEIterator;
33
34   public:
35     AliMpDEStore(TRootIOCtor* ioCtor);
36     virtual ~AliMpDEStore();
37     
38     // static access method
39     static AliMpDEStore* Instance(Bool_t warn = true); 
40     static AliMpDEStore* ReadData(const AliMpDataStreams& dataStreams,
41                                   Bool_t warn = true);
42     
43     // methods
44     AliMpDetElement* GetDetElement(Int_t detElemId, Bool_t warn = true) const;
45     AliMpDetElement* GetDetElement(const TString& detName, Bool_t warn = true) const;
46     
47   private:
48     AliMpDEStore(const AliMpDataStreams& dataStreams);
49     /// Not implemented
50     AliMpDEStore();
51     /// Not implemented
52     AliMpDEStore(const AliMpDEStore& rhs);
53     /// Not implemented
54     AliMpDEStore& operator=(const AliMpDEStore& rhs);
55
56     // methods
57     Bool_t IsPlaneType(const TString& planeTypeName);
58  
59     Bool_t ReadDENames(AliMp::StationType stationType, 
60                        AliMq::Station12Type station12Type = AliMq::kNotSt12);
61     void   FillDEs();
62
63     // static data members      
64     static AliMpDEStore* fgInstance;       ///< Singleton instance
65     static const char    fgkCommentPrefix; ///< Comment prefix in DE names file
66
67     // data members     
68     const AliMpDataStreams&  fkDataStreams; //!< Data streams
69     AliMpExMap  fDetElements; ///< Map between DE Ids and DE objects
70       
71   ClassDef(AliMpDEStore,1)  // The manager class for definition of detection element types
72 };
73
74 #endif //ALI_MP_MANAGER_H
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89