AliRoot Core  ee782a0 (ee782a0)
AliMpDDLStore.h
Go to the documentation of this file.
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 
16 
17 #ifndef ALI_MP_DDL_STORE_H
18 #define ALI_MP_DDL_STORE_H
19 
20 #include "AliMpExMap.h"
21 #include "AliMpRegionalTrigger.h"
22 #include <TObject.h>
23 #include <TObjArray.h>
24 #include <TArrayI.h>
25 
26 
27 class AliMpDDL;
28 class AliMpDetElement;
29 class AliMpBusPatch;
30 class AliMpLocalBoard;
31 class AliMpTriggerCrate;
32 class AliMpDataStreams;
33 class TArrayI;
34 
35 class AliMpDDLStore : public TObject {
36 
37  public:
38  AliMpDDLStore(TRootIOCtor* ioCtor);
39  virtual ~AliMpDDLStore();
40 
41  // static access method
42  static AliMpDDLStore* Instance(Bool_t warn = true);
43  static AliMpDDLStore* ReadData(const AliMpDataStreams& dataStreams,
44  Bool_t warn = true);
45 
46  // methods
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;
53 
56 
57  Int_t GetDEfromBus(Int_t busPatchId) const;
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;
61 
62  Int_t GetDDLfromBus(Int_t busPatchId) const;
63  Int_t GetBusPatchId(Int_t detElemId, Int_t manuId) const;
64 
65  Long_t GetLinkPortId(Int_t busPatchId) const;
66 
68  void PrintAllManu() const;
69 
70  // Set methods
71  void SetRegionalTrigger(const AliMpRegionalTrigger& regionalTrigger);
72 
73  TIterator* CreateBusPatchIterator() const;
74 
75  private:
76  AliMpDDLStore(const AliMpDataStreams& dataStreams);
78  AliMpDDLStore();
80  AliMpDDLStore(const AliMpDDLStore& rhs);
83 
84  // static methods
85  static const TString& GetRevertKeyword();
86  static const TString& GetExplicitKeyword();
87 
88  // methods
89  Int_t GetManuListIndex(Int_t detElemId) const;
90  Int_t GetBusPatchIndex(Int_t detElemId, Int_t manuId) const;
91  Bool_t ReadDDLs(const AliMpDataStreams& dataStreams);
92  Bool_t ReadTrigger(const AliMpDataStreams& dataStreams);
93  Bool_t SetTriggerDDLs();
94  Bool_t SetManus();
95  Bool_t ReadBusPatchSpecial(const AliMpDataStreams& dataStreams);
96  Bool_t SetPatchModules();
97  Bool_t ReadBusPatchInfo(const AliMpDataStreams& dataStreams);
98  Int_t GetLocalBoardId(TString name) const;
99 
100  // static data members
102  static const Int_t fgkNofDDLs;
103  static const Int_t fgkNofTriggerDDLs;
104 
105  // data members
108  TArrayI fManuList12[16];
109  TArrayI fManuBridge2[16];
111 
112  ClassDef(AliMpDDLStore,5) // The manager class for definition of detection element types
113 };
114 
115 #endif //ALI_MP_DDL_STORE_H
116 
117 
118 
119 
120 
121 
122 
123 
124 
125 
126 
127 
128 
129 
130 
Long_t GetLinkPortId(Int_t busPatchId) const
Bool_t ReadTrigger(const AliMpDataStreams &dataStreams)
TArrayI fManuBridge2[16]
Arrays of manu number before the bridge in buspatch.
void SetRegionalTrigger(const AliMpRegionalTrigger &regionalTrigger)
AliMpLocalBoard * GetLocalBoard(Int_t localBoardId, Bool_t warn=true) const
Bool_t SetPatchModules()
Int_t GetDEfromLocalBoard(Int_t localBoardId, Int_t chamberId) const
The class defines the properties of trigger crate.
#define TObjArray
The top container class for DDLs, det elements and bus patched.
Definition: AliMpDDLStore.h:35
TObjArray fDDLs
Array of DDL objects.
static const Int_t fgkNofDDLs
Total number of DDLs.
Bool_t ReadDDLs(const AliMpDataStreams &dataStreams)
Int_t GetDEfromBus(Int_t busPatchId) const
TIterator * CreateBusPatchIterator() const
Int_t GetPreviousDEfromLocalBoard(Int_t localBoardId, Int_t chamberId) const
const AliMpRegionalTrigger * GetRegionalTrigger() const
Return regional trigger object.
Definition: AliMpDDLStore.h:55
AliMpDDLStore()
Not implemented.
AliMpDetElement * GetDetElement(Int_t detElemId, Bool_t warn=true) const
Class that manages the properties of the local board.
The class defines the electronics properties of detection element.
AliMpRegionalTrigger fRegionalTrigger
Regional trigger.
Bool_t ReadBusPatchSpecial(const AliMpDataStreams &dataStreams)
The class defined electronics properties of DDL.
Definition: AliMpDDL.h:20
static AliMpDDLStore * Instance(Bool_t warn=true)
AliMpExMap fBusPatches
The map of bus patches per their IDs.
Int_t GetBusPatchId(Int_t detElemId, Int_t manuId) const
Int_t GetBusPatchIndex(Int_t detElemId, Int_t manuId) const
AliMpDDL * GetDDL(Int_t ddlId, Bool_t warn=true) const
static AliMpDDLStore * fgInstance
Singleton instance.
Int_t GetNextDEfromLocalBoard(Int_t localBoardId, Int_t chamberId) const
static const TString & GetExplicitKeyword()
AliMpBusPatch * GetBusPatch(Int_t busPatchId, Bool_t warn=true) const
static AliMpDDLStore * ReadData(const AliMpDataStreams &dataStreams, Bool_t warn=true)
The class defines the properties of regional trigger crate.
static const TString & GetRevertKeyword()
The class defines the properties of BusPatch.
Definition: AliMpBusPatch.h:21
TArrayI fManuList12[16]
Arrays of 1st manu in bus.
AliMpTriggerCrate * GetTriggerCrate(TString crateName, Bool_t warn=true) const
Int_t GetManuListIndex(Int_t detElemId) const
Bool_t SetTriggerDDLs()
void PrintAllManu() const
Print info of all manus.
Bool_t ReadBusPatchInfo(const AliMpDataStreams &dataStreams)
Int_t GetLocalBoardId(TString name) const
AliMpDDLStore & operator=(const AliMpDDLStore &rhs)
Not implemented.
virtual ~AliMpDDLStore()
static const Int_t fgkNofTriggerDDLs
Total number of trigger DDLs.
Int_t GetDDLfromBus(Int_t busPatchId) const
Helper class making Root persistent TExMap.
Definition: AliMpExMap.h:28
Mapping data streams provider.