ATLAS Offline Software
Loading...
Searching...
No Matches
TGCCabling.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef MUONTGC_CABLING_TGCCABLING_HH
6#define MUONTGC_CABLING_TGCCABLING_HH
7
11
12#include <string>
13#include <map>
14#include <mutex>
15
16class StatusCode;
17
18namespace MuonTGC_Cabling {
19
20class TGCCableASDToPP;
21class TGCCableHPBToSL;
22class TGCCableInASD;
23class TGCCableInPP;
24class TGCCableInSLB;
25class TGCCablePPToSLB;
30class TGCChannelId;
31class TGCModuleMap;
32class TGCModuleSLB;
33
35{
36 private: //hide default constructor, copy constructor and assignment
37 TGCCabling () = delete;
38 TGCCabling (const TGCCabling&) = delete;
39 TGCCabling& operator= (const TGCCabling&) = delete;
40
41
42 public:
43 // Constructor & Destructor
44 TGCCabling(const std::string& filenameASDToPP,
45 const std::string& filenameInPP,
46 const std::string& filenamePPToSL,
47 const std::string& filenameSLBToROD);
48
49 virtual ~TGCCabling(void);
50
63
64 // slbIn --> AsdOut
65 virtual TGCChannelId* getASDOutChannel(const TGCChannelId* slb_in) const;
66
67
69 // readout ID -> SLB Module
71 int rodId,
72 int sswId,
73 int sbLoc) const;
74
75 // readoutID -> RxID
77 int rodId,
78 int sswId,
79 int sbLoc) const;
80
81 // SSW ID/RX ID-> SLB Module
83 int rodId,
84 int sswId,
85 int rxId) const;
86
87
88 // SLB Module -> readout ID
89 bool getReadoutFromSLB(const TGCModuleSLB* slb,
90 TGCId::SideType & side,
91 int & rodId,
92 int & sswId,
93 int & sbLoc) const;
94
95
96 // readout channel -> chamber channel
98 int rodId,
99 int sswId,
100 int sbLoc,
101 int channel,
102 bool orChannel=false) const;
103
104
105 // chamber channel -> readout channel
106 bool getReadoutFromASDOut(const TGCChannelASDOut* asdout,
107 TGCId::SideType & side,
108 int & rodId,
109 int & sswId,
110 int & sbLoc,
111 int & channel,
112 bool orChannel=false) const;
113
114
115 // readout channel -> coincidence channel
117 int rodId,
118 int sswId,
119 int sbLoc,
120 int channel,
121 TGCId::SignalType & signal,
122 TGCId::RegionType & region,
123 int & sectorInReadout,
124 int & hpbId,
125 int & block,
126 int & hitId,
127 int & pos) const;
128
129
130 // coincidence channel -> readout channel
132 int rodId,
133 int & sswId,
134 int & sbLoc,
135 int & channel,
136 TGCId::SignalType signal,
137 TGCId::RegionType region,
138 int sectorInReadout,
139 int hpbId,
140 int block,
141 int hitId,
142 int pos,
143 TGCId::ModuleType moduleType,
144 bool orChannel) const;
145
146 // readout channel -> coincidence channel
148 int rodId,
149 int sswId,
150 int sbLoc,
151 int channel,
152 int & block,
153 int & pos,
154 bool middle=false) const;
155
156
157 // coincidence channel -> readout channel
159 int rodId,
160 int sswId,
161 int sbLoc,
162 int & channel,
163 int block,
164 int pos,
165 bool middle=false) const;
166
167 // channel connection
168 TGCChannelId* getChannel(const TGCChannelId* channelId,
170 bool orChannel=false) const;
171 // module connection
172 TGCModuleMap* getModule(const TGCModuleId* moduleId,
174
175public:
176 // readin database which describes difference from ASDToPP.db
177 StatusCode updateCableASDToPP();
178
179private:
189
190 // Protected by mutex.
191 mutable std::map<int, TGCModuleId*> m_slbModuleIdMap ATLAS_THREAD_SAFE;
192 mutable std::mutex m_mutex;
193
195 const int rodId,
196 const int sswId,
197 const int sbLoc) const;
198};
199
200} // end of namespace
201
202#endif
Define macros for attributes used to control the static checker.
bool getReadoutFromLowPtCoincidence(TGCId::SideType side, int rodId, int sswId, int sbLoc, int &channel, int block, int pos, bool middle=false) const
bool getLowPtCoincidenceFromReadout(TGCId::SideType side, int rodId, int sswId, int sbLoc, int channel, int &block, int &pos, bool middle=false) const
TGCCableSLBToHPB * m_cableSLBToHPB
Definition TGCCabling.h:185
bool getReadoutFromASDOut(const TGCChannelASDOut *asdout, TGCId::SideType &side, int &rodId, int &sswId, int &sbLoc, int &channel, bool orChannel=false) const
int getRxIdFromReadout(TGCId::SideType side, int rodId, int sswId, int sbLoc) const
bool getHighPtIDFromReadout(TGCId::SideType side, int rodId, int sswId, int sbLoc, int channel, TGCId::SignalType &signal, TGCId::RegionType &region, int &sectorInReadout, int &hpbId, int &block, int &hitId, int &pos) const
TGCCablePPToSLB * m_cablePPToSLB
Definition TGCCabling.h:183
TGCModuleMap * getModule(const TGCModuleId *moduleId, TGCModuleId::ModuleIdType type) const
TGCCabling(const TGCCabling &)=delete
TGCCableHPBToSL * m_cableHPBToSL
Definition TGCCabling.h:186
TGCCableSSWToROD * m_cableSSWToROD
Definition TGCCabling.h:188
std::map< int, TGCModuleId * > m_slbModuleIdMap ATLAS_THREAD_SAFE
Definition TGCCabling.h:191
TGCChannelId * getASDOutFromReadout(TGCId::SideType side, int rodId, int sswId, int sbLoc, int channel, bool orChannel=false) const
TGCChannelId * getChannel(const TGCChannelId *channelId, TGCChannelId::ChannelIdType type, bool orChannel=false) const
TGCCableInASD * m_cableInASD
Definition TGCCabling.h:180
TGCCableSLBToSSW * m_cableSLBToSSW
Definition TGCCabling.h:187
int getIndexFromReadoutWithoutChannel(const TGCId::SideType side, const int rodId, const int sswId, const int sbLoc) const
TGCCabling & operator=(const TGCCabling &)=delete
virtual TGCChannelId * getASDOutChannel(const TGCChannelId *slb_in) const
TGCCableASDToPP * m_cableASDToPP
Definition TGCCabling.h:181
bool getReadoutFromSLB(const TGCModuleSLB *slb, TGCId::SideType &side, int &rodId, int &sswId, int &sbLoc) const
TGCCableInSLB * m_cableInSLB
Definition TGCCabling.h:184
bool getReadoutFromHighPtID(TGCId::SideType side, int rodId, int &sswId, int &sbLoc, int &channel, TGCId::SignalType signal, TGCId::RegionType region, int sectorInReadout, int hpbId, int block, int hitId, int pos, TGCId::ModuleType moduleType, bool orChannel) const
const TGCModuleId * getSLBFromReadout(TGCId::SideType side, int rodId, int sswId, int sbLoc) const
TGCModuleId * getSLBFromRxId(TGCId::SideType side, int rodId, int sswId, int rxId) const