]>
Commit | Line | Data |
---|---|---|
f0c62051 | 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 | ||
61c370dd | 20 | #include "AliMpExMap.h" |
efb566fd | 21 | #include "AliMpRegionalTrigger.h" |
f0c62051 | 22 | #include <TObject.h> |
23 | #include <TObjArray.h> | |
42d368d0 | 24 | #include <TArrayI.h> |
f0c62051 | 25 | |
f0c62051 | 26 | |
27 | class AliMpDDL; | |
28 | class AliMpDetElement; | |
29 | class AliMpBusPatch; | |
61c370dd | 30 | class AliMpLocalBoard; |
31 | class AliMpTriggerCrate; | |
ab167304 | 32 | class AliMpDataStreams; |
42d368d0 | 33 | class TArrayI; |
f0c62051 | 34 | |
35 | class AliMpDDLStore : public TObject { | |
36 | ||
37 | public: | |
7d5d0cc5 | 38 | AliMpDDLStore(TRootIOCtor* ioCtor); |
f0c62051 | 39 | virtual ~AliMpDDLStore(); |
40 | ||
41 | // static access method | |
5f377a9a | 42 | static AliMpDDLStore* Instance(Bool_t warn = true); |
ab167304 | 43 | static AliMpDDLStore* ReadData(const AliMpDataStreams& dataStreams, |
d2d10ee1 | 44 | Bool_t warn = true); |
f0c62051 | 45 | |
46 | // methods | |
61c370dd | 47 | AliMpDDL* GetDDL(Int_t ddlId, Bool_t warn = true) const; |
48 | AliMpDetElement* GetDetElement(Int_t detElemId, Bool_t warn = true) const; | |
49 | AliMpBusPatch* GetBusPatch(Int_t busPatchId, Bool_t warn = true) const; | |
50 | AliMpLocalBoard* GetLocalBoard(Int_t localBoardId, Bool_t warn = true) const; | |
51 | AliMpTriggerCrate* GetTriggerCrate(TString crateName, Bool_t warn = true) const; | |
52 | AliMpTriggerCrate* GetTriggerCrate(Int_t ddlId, Int_t index, Bool_t warn = true) const; | |
efb566fd | 53 | |
54 | /// Return regional trigger object | |
55 | const AliMpRegionalTrigger* GetRegionalTrigger() const { return &fRegionalTrigger; } | |
40c8e44b | 56 | |
f0c62051 | 57 | Int_t GetDEfromBus(Int_t busPatchId) const; |
61c370dd | 58 | Int_t GetDEfromLocalBoard(Int_t localBoardId, Int_t chamberId) const; |
59 | Int_t GetNextDEfromLocalBoard(Int_t localBoardId, Int_t chamberId) const; | |
60 | Int_t GetPreviousDEfromLocalBoard(Int_t localBoardId, Int_t chamberId) const; | |
472027a9 | 61 | |
f0c62051 | 62 | Int_t GetDDLfromBus(Int_t busPatchId) const; |
42d368d0 | 63 | Int_t GetBusPatchId(Int_t detElemId, Int_t manuId) const; |
59754717 | 64 | |
168e9c4d | 65 | Long_t GetLinkPortId(Int_t busPatchId) const; |
f0c62051 | 66 | |
630711ed | 67 | /// Print info of all manus |
92faf71f | 68 | void PrintAllManu() const; |
efb566fd | 69 | |
70 | // Set methods | |
71 | void SetRegionalTrigger(const AliMpRegionalTrigger& regionalTrigger); | |
92faf71f | 72 | |
630711ed | 73 | TIterator* CreateBusPatchIterator() const; |
40c8e44b | 74 | |
f0c62051 | 75 | private: |
ab167304 | 76 | AliMpDDLStore(const AliMpDataStreams& dataStreams); |
77 | /// Not implemented | |
f0c62051 | 78 | AliMpDDLStore(); |
71a2d3aa | 79 | /// Not implemented |
f0c62051 | 80 | AliMpDDLStore(const AliMpDDLStore& rhs); |
71a2d3aa | 81 | /// Not implemented |
f0c62051 | 82 | AliMpDDLStore& operator=(const AliMpDDLStore& rhs); |
83 | ||
31edb2d7 | 84 | // static methods |
85 | static const TString& GetRevertKeyword(); | |
86 | static const TString& GetExplicitKeyword(); | |
87 | ||
f0c62051 | 88 | // methods |
42d368d0 | 89 | Int_t GetManuListIndex(Int_t detElemId) const; |
90 | Int_t GetBusPatchIndex(Int_t detElemId, Int_t manuId) const; | |
21027e5a | 91 | Bool_t ReadDDLs(const AliMpDataStreams& dataStreams); |
92 | Bool_t ReadTrigger(const AliMpDataStreams& dataStreams); | |
efb566fd | 93 | Bool_t SetTriggerDDLs(); |
42d368d0 | 94 | Bool_t SetManus(); |
21027e5a | 95 | Bool_t ReadBusPatchSpecial(const AliMpDataStreams& dataStreams); |
dbc1e34c | 96 | Bool_t SetPatchModules(); |
21027e5a | 97 | Bool_t ReadBusPatchInfo(const AliMpDataStreams& dataStreams); |
61c370dd | 98 | Int_t GetLocalBoardId(TString name) const; |
f0c62051 | 99 | |
100 | // static data members | |
101 | static AliMpDDLStore* fgInstance; ///< Singleton instance | |
102 | static const Int_t fgkNofDDLs; ///< Total number of DDLs | |
61c370dd | 103 | static const Int_t fgkNofTriggerDDLs; ///< Total number of trigger DDLs |
f0c62051 | 104 | |
105 | // data members | |
42d368d0 | 106 | TObjArray fDDLs; ///< Array of DDL objects |
42d368d0 | 107 | AliMpExMap fBusPatches; ///< The map of bus patches per their IDs |
108 | TArrayI fManuList12[16]; ///< Arrays of 1st manu in bus | |
0f30c458 | 109 | TArrayI fManuBridge2[16]; ///< Arrays of manu number before the bridge in buspatch |
efb566fd | 110 | AliMpRegionalTrigger fRegionalTrigger; ///< Regional trigger |
40c8e44b | 111 | |
92c23b09 | 112 | ClassDef(AliMpDDLStore,5) // The manager class for definition of detection element types |
f0c62051 | 113 | }; |
114 | ||
115 | #endif //ALI_MP_DDL_STORE_H | |
116 | ||
117 | ||
118 | ||
119 | ||
120 | ||
121 | ||
122 | ||
123 | ||
124 | ||
125 | ||
126 | ||
127 | ||
128 | ||
129 | ||
130 |