]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpDDLStore.h
- Added new functions:
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpDDLStore.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: AliMpDDLStore.h,v 1.6 2006/05/24 13:58:16 ivana Exp $ 
6
7 /// \ingroup management
8 /// \class AliMpDDLStore
9 /// \brief The top container class for DDLs, det elements and bus patched
10 ///
11 /// It provides acces to DDL, det element and bus patches objects
12 /// via various characteristics.
13 ///
14 /// \author Ivana Hrivnacova, IPN Orsay;
15 ///         Christian Finck, SUBATECH Nantes
16
17 #ifndef ALI_MP_DDL_STORE_H
18 #define ALI_MP_DDL_STORE_H
19
20 #include <TObject.h>
21 #include <TObjArray.h>
22 #include <TArrayI.h>
23
24 #include "AliMpExMap.h"
25 #include "AliMpIntPair.h"
26
27 class AliMpDDL;
28 class AliMpDetElement;
29 class AliMpBusPatch;
30 class AliMpDEStore;
31 class TArrayI;
32
33 class AliMpDDLStore : public  TObject {
34
35   public:
36     AliMpDDLStore(TRootIOCtor* /*ioCtor*/);
37     virtual ~AliMpDDLStore();
38     
39     // static access method
40     static AliMpDDLStore* Instance(); 
41     
42     // methods
43     AliMpDDL*         GetDDL(Int_t ddlId, Bool_t warn = true) const;
44     AliMpDetElement*  GetDetElement(Int_t detElemId, Bool_t warn = true) const;
45     AliMpBusPatch*    GetBusPatch(Int_t busPatchId, Bool_t warn = true) const;
46
47     Int_t  GetDEfromBus(Int_t busPatchId) const;
48     Int_t  GetDDLfromBus(Int_t busPatchId) const;
49     Int_t  GetBusPatchId(Int_t detElemId, Int_t manuId) const;
50
51     
52     AliMpIntPair  GetDetElemIdManu(Int_t manuSerial) const;
53
54   private:
55     AliMpDDLStore();
56     AliMpDDLStore(const AliMpDDLStore& rhs);
57     AliMpDDLStore& operator=(const AliMpDDLStore& rhs);
58
59     // methods
60     Int_t  GetManuListIndex(Int_t detElemId) const;
61     Int_t  GetBusPatchIndex(Int_t detElemId, Int_t manuId) const;
62     Bool_t ReadDDLs();
63     Bool_t SetManus();
64
65     // static data members      
66     static AliMpDDLStore* fgInstance; ///< Singleton instance
67     static const Int_t    fgkNofDDLs; ///< Total number of DDLs
68
69     // data members     
70     TObjArray     fDDLs;           ///< Array of DDL objects
71     AliMpDEStore* fDetElements;    ///< Detection element store
72     AliMpExMap    fBusPatches;     ///< The map of bus patches per their IDs
73     TArrayI       fManuList12[16]; ///< Arrays of 1st manu in bus
74
75   ClassDef(AliMpDDLStore,1)  // The manager class for definition of detection element types
76 };
77
78 #endif //ALI_MP_DDL_STORE_H
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93