ATLAS Offline Software
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 
16 class StatusCode;
17 
18 namespace MuonTGC_Cabling {
19 
20 class TGCCableASDToPP;
21 class TGCCableHPBToSL;
22 class TGCCableInASD;
23 class TGCCableInPP;
24 class TGCCableInSLB;
25 class TGCCablePPToSLB;
26 class TGCCableSLBToHPB;
27 class TGCCableSLBToSSW;
28 class TGCCableSSWToROD;
29 class TGCChannelASDOut;
30 class TGCChannelId;
31 class TGCModuleMap;
32 class 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 
52  MAXRODID = 12,
53  MINRODID = 1,
54  MAXSRODID = 3,
55  MINSRODID = 1,
56  MAXSSWID = 9,
57  MINSSWID = 0,
58  MAXSBLOC = 31,
59  MINSBLOC = 0,
60  MINCHANNELID = 40,
61  MAXCHANNELID = 199
62  };
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,
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,
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,
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,
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
170  bool orChannel=false) const;
171  // module connection
172  TGCModuleMap* getModule(const TGCModuleId* moduleId,
174 
175 public:
176  // readin database which describes difference from ASDToPP.db
178 
179 private:
189 
190  // Protected by mutex.
191  mutable std::map<int, TGCModuleId*> m_slbModuleIdMap ATLAS_THREAD_SAFE;
193 
195  const int rodId,
196  const int sswId,
197  const int sbLoc) const;
198 };
199 
200 } // end of namespace
201 
202 #endif
MuonTGC_Cabling::TGCCabling::getReadoutFromHighPtID
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
Definition: TGCCabling.cxx:349
MuonTGC_Cabling::TGCCabling::MINSRODID
@ MINSRODID
Definition: TGCCabling.h:55
MuonTGC_Cabling::TGCCabling::getChannel
TGCChannelId * getChannel(const TGCChannelId *channelId, TGCChannelId::ChannelIdType type, bool orChannel=false) const
Definition: TGCCabling.cxx:616
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
MuonTGC_Cabling::TGCCableInSLB
Definition: TGCCableInSLB.h:14
MuonTGC_Cabling::TGCCabling::m_cableSSWToROD
TGCCableSSWToROD * m_cableSSWToROD
Definition: TGCCabling.h:188
MuonTGC_Cabling::TGCCablePPToSLB
Definition: TGCCablePPToSLB.h:19
MuonTGC_Cabling::TGCCabling::MAXSBLOC
@ MAXSBLOC
Definition: TGCCabling.h:58
MuonTGC_Cabling::TGCCabling::m_cableInASD
TGCCableInASD * m_cableInASD
Definition: TGCCabling.h:180
MuonTGC_Cabling::TGCCabling::m_cableInPP
TGCCableInPP * m_cableInPP
Definition: TGCCabling.h:182
MuonTGC_Cabling::TGCCabling::m_cableSLBToHPB
TGCCableSLBToHPB * m_cableSLBToHPB
Definition: TGCCabling.h:185
BeamSpot::mutex
std::mutex mutex
Definition: InDetBeamSpotVertex.cxx:18
MuonTGC_Cabling::TGCCabling::getRxIdFromReadout
int getRxIdFromReadout(TGCId::SideType side, int rodId, int sswId, int sbLoc) const
Definition: TGCCabling.cxx:159
MuonTGC_Cabling::TGCCableSLBToHPB
Definition: TGCCableSLBToHPB.h:19
MuonTGC_Cabling::TGCCabling::MAXSSWID
@ MAXSSWID
Definition: TGCCabling.h:56
MuonTGC_Cabling::TGCModuleSLB
Definition: TGCModuleSLB.h:14
MuonTGC_Cabling::TGCId::SignalType
SignalType
Definition: TGCId.h:49
MuonTGC_Cabling::TGCId::ModuleType
ModuleType
Definition: TGCId.h:47
MuonTGC_Cabling::TGCCabling::MAXRODID
@ MAXRODID
Definition: TGCCabling.h:52
MuonTGC_Cabling::TGCCabling::MAXCHANNELID
@ MAXCHANNELID
Definition: TGCCabling.h:61
MuonTGC_Cabling::TGCCabling::m_mutex
std::mutex m_mutex
Definition: TGCCabling.h:192
MuonTGC_Cabling::TGCCabling::m_cableSLBToSSW
TGCCableSLBToSSW * m_cableSLBToSSW
Definition: TGCCabling.h:187
TGCModuleId.h
MuonTGC_Cabling::TGCModuleMap
Definition: TGCModuleMap.h:16
MuonTGC_Cabling::TGCCabling::getSLBFromReadout
const TGCModuleId * getSLBFromReadout(TGCId::SideType side, int rodId, int sswId, int sbLoc) const
Definition: TGCCabling.cxx:83
MuonTGC_Cabling::TGCCableSSWToROD
Definition: TGCCableSSWToROD.h:18
MuonTGC_Cabling::TGCCableInPP
Definition: TGCCableInPP.h:20
TRT::Hit::side
@ side
Definition: HitInfo.h:83
TGCChannelId.h
Cut::signal
@ signal
Definition: SUSYToolsAlg.cxx:67
MuonTGC_Cabling::TGCCabling::m_cableHPBToSL
TGCCableHPBToSL * m_cableHPBToSL
Definition: TGCCabling.h:186
MuonTGC_Cabling::TGCCabling::MAXMINREADOUTIDS
MAXMINREADOUTIDS
Definition: TGCCabling.h:51
MuonTGC_Cabling::TGCCabling::getASDOutFromReadout
TGCChannelId * getASDOutFromReadout(TGCId::SideType side, int rodId, int sswId, int sbLoc, int channel, bool orChannel=false) const
Definition: TGCCabling.cxx:555
MuonTGC_Cabling::TGCCabling::m_cableASDToPP
TGCCableASDToPP * m_cableASDToPP
Definition: TGCCabling.h:181
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
MuonTGC_Cabling
Definition: TGCCable.h:13
MuonTGC_Cabling::TGCCabling::MINSSWID
@ MINSSWID
Definition: TGCCabling.h:57
MuonTGC_Cabling::TGCCabling::MINCHANNELID
@ MINCHANNELID
Definition: TGCCabling.h:60
MuonTGC_Cabling::TGCCabling::getASDOutChannel
virtual TGCChannelId * getASDOutChannel(const TGCChannelId *slb_in) const
Definition: TGCCabling.cxx:68
MuonTGC_Cabling::TGCCabling::getModule
TGCModuleMap * getModule(const TGCModuleId *moduleId, TGCModuleId::ModuleIdType type) const
Definition: TGCCabling.cxx:773
MuonTGC_Cabling::TGCCabling::MINRODID
@ MINRODID
Definition: TGCCabling.h:53
CaloCondBlobAlgs_fillNoiseFromASCII.channelId
channelId
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:122
MuonTGC_Cabling::TGCCabling::operator=
TGCCabling & operator=(const TGCCabling &)=delete
MuonTGC_Cabling::TGCCabling::m_cablePPToSLB
TGCCablePPToSLB * m_cablePPToSLB
Definition: TGCCabling.h:183
MuonTGC_Cabling::TGCModuleId::ModuleIdType
ModuleIdType
Definition: TGCModuleId.h:15
MuonTGC_Cabling::TGCCabling::m_cableInSLB
TGCCableInSLB * m_cableInSLB
Definition: TGCCabling.h:184
MuonTGC_Cabling::TGCChannelId::ChannelIdType
ChannelIdType
Definition: TGCChannelId.h:17
MuonTGC_Cabling::TGCCabling::~TGCCabling
virtual ~TGCCabling(void)
Definition: TGCCabling.cxx:44
MuonTGC_Cabling::TGCCabling::getReadoutFromLowPtCoincidence
bool getReadoutFromLowPtCoincidence(TGCId::SideType side, int rodId, int sswId, int sbLoc, int &channel, int block, int pos, bool middle=false) const
Definition: TGCCabling.cxx:482
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
MuonTGC_Cabling::TGCCabling::ATLAS_THREAD_SAFE
std::map< int, TGCModuleId * > m_slbModuleIdMap ATLAS_THREAD_SAFE
Definition: TGCCabling.h:191
MuonTGC_Cabling::TGCCabling::TGCCabling
TGCCabling()=delete
MuonTGC_Cabling::TGCCableInASD
Definition: TGCCableInASD.h:20
MuonTGC_Cabling::TGCCabling::getLowPtCoincidenceFromReadout
bool getLowPtCoincidenceFromReadout(TGCId::SideType side, int rodId, int sswId, int sbLoc, int channel, int &block, int &pos, bool middle=false) const
Definition: TGCCabling.cxx:520
MuonTGC_Cabling::TGCCableASDToPP
Definition: TGCCableASDToPP.h:22
MuonTGC_Cabling::TGCCabling::TGCCabling
TGCCabling(const TGCCabling &)=delete
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
MuonTGC_Cabling::TGCChannelId
Definition: TGCChannelId.h:15
MuonTGC_Cabling::TGCCabling::getHighPtIDFromReadout
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
Definition: TGCCabling.cxx:428
MuonTGC_Cabling::TGCCabling::getIndexFromReadoutWithoutChannel
int getIndexFromReadoutWithoutChannel(const TGCId::SideType side, const int rodId, const int sswId, const int sbLoc) const
Definition: TGCCabling.cxx:814
MuonTGC_Cabling::TGCCableHPBToSL
Definition: TGCCableHPBToSL.h:20
MuonTGC_Cabling::TGCChannelASDOut
Definition: TGCChannelASDOut.h:12
MuonTGC_Cabling::TGCId::RegionType
RegionType
Definition: TGCId.h:53
MuonTGC_Cabling::TGCModuleId
Definition: TGCModuleId.h:13
MuonTGC_Cabling::TGCId::SideType
SideType
Definition: TGCId.h:45
checker_macros.h
Define macros for attributes used to control the static checker.
MuonTGC_Cabling::TGCCabling::updateCableASDToPP
StatusCode updateCableASDToPP()
Definition: TGCCabling.cxx:62
MuonTGC_Cabling::TGCCabling::MINSBLOC
@ MINSBLOC
Definition: TGCCabling.h:59
MuonTGC_Cabling::TGCCableSLBToSSW
Definition: TGCCableSLBToSSW.h:20
MuonTGC_Cabling::TGCCabling
Definition: TGCCabling.h:35
MuonTGC_Cabling::TGCCabling::MAXSRODID
@ MAXSRODID
Definition: TGCCabling.h:54
MuonTGC_Cabling::TGCCabling::getReadoutFromASDOut
bool getReadoutFromASDOut(const TGCChannelASDOut *asdout, TGCId::SideType &side, int &rodId, int &sswId, int &sbLoc, int &channel, bool orChannel=false) const
Definition: TGCCabling.cxx:580
MuonTGC_Cabling::TGCCabling::getSLBFromRxId
TGCModuleId * getSLBFromRxId(TGCId::SideType side, int rodId, int sswId, int rxId) const
Definition: TGCCabling.cxx:209
MuonTGC_Cabling::TGCCabling::getReadoutFromSLB
bool getReadoutFromSLB(const TGCModuleSLB *slb, TGCId::SideType &side, int &rodId, int &sswId, int &sbLoc) const
Definition: TGCCabling.cxx:259