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