#include <CSCcablingSvc.h>
|
| virtual StatusCode | initialize () override |
| bool | onlineId (const uint16_t subdetectorID, const uint16_t offlineID, uint32_t &rodId) const |
| | map offline ROD identifier to online ID
|
| bool | onlineId (const uint16_t offlineID, uint16_t &rodId) const |
| bool | offlineId (const uint32_t onlineIdentifier, uint16_t &rodId) const |
| | reverse map of online ID into offline ROD ID
|
| bool | is_rodId (const uint16_t rodId) const |
| | check that we have the correct online ROD id
|
| bool | is_offlineRodId (const uint16_t rodId) const |
| | check that we have the correct offline ROD id
|
| uint16_t | collectionId (const uint16_t subdetectorId, const uint16_t rodId) const |
| | calculate the collection Identifier
|
| unsigned int | nSide () const |
| unsigned int | nROD () const |
| unsigned int | maxId () const |
| void | hash2Rob (const unsigned int &, uint32_t &) const |
| | map PRD collection ID into short ROB ID, e.g.
|
| void | hash2RobFull (const unsigned int &, uint32_t &) const |
| | map PRD collection ID into full ROB ID (with subdetector ID), e.g.
|
| void | hash2Rod (const unsigned int &, uint32_t &) const |
| | map PRD collection ID into offline ROD ID
|
| void | hash2SubdetectorId (const unsigned int &, uint32_t &) const |
| | map PRD collection ID into subdetector ID, i.e.
|
| void | hash2CollectionId (const unsigned int &, uint16_t &) const |
| | map PRD collection ID into RDO collection ID
|
| MsgStream & | msg () const |
| bool | msgLvl (const MSG::Level lvl) const |
|
| unsigned int | m_side {2} |
| unsigned int | m_rod {16} |
| unsigned int | m_max {32} |
| Gaudi::Property< bool > | m_run1 {this, "Run1Cabling", false} |
Definition at line 18 of file CSCcablingSvc.h.
◆ collectionId()
| uint16_t CSCcablingSvc::collectionId |
( |
const uint16_t | subdetectorId, |
|
|
const uint16_t | rodId ) const |
calculate the collection Identifier
Definition at line 176 of file CSCcablingSvc.cxx.
176 {
177
178 uint16_t subId = (subDetectorId == 0x6A) ? 0 : 1;
180
181
182
183 if((rodId & 0x10) == 0x10){
184 onlineColId = subId*this->
nROD() + rodId - 16;
185 } else {
186 onlineColId = subId*this->
nROD() + rodId;
187 }
188
189 return onlineColId;
190}
unsigned int nROD() const
◆ hash2CollectionId()
| void CSCcablingSvc::hash2CollectionId |
( |
const unsigned int & | hashid, |
|
|
uint16_t & | collectionid ) const |
map PRD collection ID into RDO collection ID
Definition at line 353 of file CSCcablingSvc.cxx.
353 {
356
359
361}
void hash2Rod(const unsigned int &, uint32_t &) const
map PRD collection ID into offline ROD ID
uint16_t collectionId(const uint16_t subdetectorId, const uint16_t rodId) const
calculate the collection Identifier
void hash2SubdetectorId(const unsigned int &, uint32_t &) const
map PRD collection ID into subdetector ID, i.e.
◆ hash2Rob()
| void CSCcablingSvc::hash2Rob |
( |
const unsigned int & | hashid, |
|
|
uint32_t & | robid ) const |
map PRD collection ID into short ROB ID, e.g.
0x81
Definition at line 192 of file CSCcablingSvc.cxx.
192 {
194 switch (hashid){
195 case 0:
196 case 16:
197 case 8:
198 case 24:
199 robid = 0x05;
200 break;
201 case 1:
202 case 17:
203 case 9:
204 case 25:
205 robid = 0x07;
206 break;
207 case 2:
208 case 18:
209 case 10:
210 case 26:
211 robid = 0x09;
212 break;
213 case 3:
214 case 19:
215 case 11:
216 case 27:
217 robid = 0x11;
218 break;
219 case 4:
220 case 20:
221 case 12:
222 case 28:
223 robid = 0x15;
224 break;
225 case 5:
226 case 21:
227 case 13:
228 case 29:
229 robid = 0x17;
230 break;
231 case 6:
232 case 22:
233 case 14:
234 case 30:
235 robid = 0x19;
236 break;
237 case 7:
238 case 23:
239 case 15:
240 case 31:
241 robid = 0x21;
242 break;
243 default:
244 robid = 0xffff;
245 break;
246 }
247 } else {
248 switch (hashid){
249 case 16:
250 case 24:
251 robid = 0x80;
252 break;
253 case 17:
254 case 25:
255 robid = 0x82;
256 break;
257 case 18:
258 case 26:
259 robid = 0x84;
260 break;
261 case 19:
262 case 27:
263 robid = 0x86;
264 break;
265 case 20:
266 case 28:
267 robid = 0x88;
268 break;
269 case 21:
270 case 29:
271 robid = 0x8a;
272 break;
273 case 22:
274 case 30:
275 robid = 0x8c;
276 break;
277 case 23:
278 case 31:
279 robid = 0x8e;
280 break;
281 case 0:
282 case 8:
283 robid = 0x81;
284 break;
285 case 1:
286 case 9:
287 robid = 0x83;
288 break;
289 case 2:
290 case 10:
291 robid = 0x85;
292 break;
293 case 3:
294 case 11:
295 robid = 0x87;
296 break;
297 case 4:
298 case 12:
299 robid = 0x89;
300 break;
301 case 5:
302 case 13:
303 robid = 0x8b;
304 break;
305 case 6:
306 case 14:
307 robid = 0x8d;
308 break;
309 case 7:
310 case 15:
311 robid = 0x8f;
312 break;
313 default:
314 robid = 0xffff;
315 break;
316 }
317 }
318}
Gaudi::Property< bool > m_run1
◆ hash2RobFull()
| void CSCcablingSvc::hash2RobFull |
( |
const unsigned int & | hashid, |
|
|
uint32_t & | robid ) const |
map PRD collection ID into full ROB ID (with subdetector ID), e.g.
0x6a0081
Definition at line 343 of file CSCcablingSvc.cxx.
343 {
346
349
350 robid = (subdetectorid << 16) | shortRobID;
351}
void hash2Rob(const unsigned int &, uint32_t &) const
map PRD collection ID into short ROB ID, e.g.
◆ hash2Rod()
| void CSCcablingSvc::hash2Rod |
( |
const unsigned int & | hashid, |
|
|
uint32_t & | rodid ) const |
map PRD collection ID into offline ROD ID
Definition at line 322 of file CSCcablingSvc.cxx.
322 {
324 rodid = hashid & 7;
325 } else {
326 if (hashid<8)
327 rodid = hashid;
328 else if (hashid<24)
329 rodid = hashid-8;
330 else
331 rodid = hashid-16;
332 rodid |= 0x10;
333 }
334}
◆ hash2SubdetectorId()
| void CSCcablingSvc::hash2SubdetectorId |
( |
const unsigned int & | hashid, |
|
|
uint32_t & | subdetectorid ) const |
map PRD collection ID into subdetector ID, i.e.
0x69 or 0x6a
Definition at line 336 of file CSCcablingSvc.cxx.
336 {
337 if ((hashid >= 8 && hashid <= 15) || (hashid >= 24))
338 subdetectorid = 0x69;
339 else
340 subdetectorid = 0x6a;
341}
◆ initialize()
| StatusCode CSCcablingSvc::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 15 of file CSCcablingSvc.cxx.
15 {
16
17
18 SmartIF<IRDBAccessSvc> rdbAccess{service("RDBAccessSvc")};
20
21 SmartIF<IGeoModelSvc> geoModel{service("GeoModelSvc")};
22 if (!geoModel) {
24 } else {
25
26 std::string atlasVersion = geoModel->atlasVersion();
27
28 IRDBRecordset_ptr atlasCommonRec = rdbAccess->getRecordsetPtr(
"AtlasCommon",atlasVersion,
"ATLAS");
29 if(atlasCommonRec->
size()==0) {
31 } else {
32 std::string configVal = (*atlasCommonRec)[0]->getString("CONFIG");
33 if(configVal=="RUN1"){
35 } else if(configVal=="RUN2" || configVal=="RUN3" || configVal=="RUN4") {
37 } else {
38 ATH_MSG_FATAL(
"Unexpected value for geometry config read from the database: " << configVal);
39 return StatusCode::FAILURE;
40 }
41 }
42 }
45
46 return StatusCode::SUCCESS;
47}
#define ATH_CHECK
Evaluate an expression and check for errors.
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
virtual unsigned int size() const =0
◆ is_offlineRodId()
| bool CSCcablingSvc::is_offlineRodId |
( |
const uint16_t | rodId | ) |
const |
check that we have the correct offline ROD id
Definition at line 165 of file CSCcablingSvc.cxx.
165 {
166
167 bool check = rodId == 0x0 || rodId == 0x1 || rodId == 0x2 || rodId == 0x3 ||
168 rodId == 0x4 || rodId == 0x5 || rodId == 0x6 || rodId == 0x7;
169
170
171 if((0x10 & rodId)==0x10)
check =
true;
173}
◆ is_rodId()
| bool CSCcablingSvc::is_rodId |
( |
const uint16_t | rodId | ) |
const |
check that we have the correct online ROD id
Definition at line 153 of file CSCcablingSvc.cxx.
153 {
154
155 bool check = rodId == 0x5 || rodId == 0x7 || rodId == 0x9 || rodId == 0x11 ||
156 rodId == 0x15 || rodId == 0x17 || rodId == 0x19 || rodId == 0x21;
157
158
159 if((rodId & 0x70) == 0)
check =
true;
160
162}
◆ maxId()
| unsigned int CSCcablingSvc::maxId |
( |
| ) |
const |
|
inline |
◆ msg()
◆ msgLvl()
| bool AthCommonMsg< Service >::msgLvl |
( |
const MSG::Level | lvl | ) |
const |
|
inlineinherited |
◆ nROD()
| unsigned int CSCcablingSvc::nROD |
( |
| ) |
const |
|
inline |
◆ nSide()
| unsigned int CSCcablingSvc::nSide |
( |
| ) |
const |
|
inline |
◆ offlineId()
| bool CSCcablingSvc::offlineId |
( |
const uint32_t | onlineIdentifier, |
|
|
uint16_t & | rodId ) const |
reverse map of online ID into offline ROD ID
Definition at line 101 of file CSCcablingSvc.cxx.
101 {
103 uint16_t id = onlineIdentifier & 0xFFFF;
104 switch ( id ) {
105 case 0x0005 :
106 rodId = 0x0;
107 break;
108 case 0x0007 :
109 rodId = 0x1;
110 break;
111 case 0x0009 :
112 rodId = 0x2;
113 break;
114 case 0x0011 :
115 rodId = 0x3;
116 break;
117 case 0x0015 :
118 rodId = 0x4;
119 break;
120 case 0x0017 :
121 rodId = 0x5;
122 break;
123 case 0x0019 :
124 rodId = 0x6;
125 break;
126 case 0x0021 :
127 rodId = 0x7;
128 break;
129 case 0x000A :
130 rodId = 0x0;
131 break;
132 case 0x000C :
133 rodId = 0x1;
134 break;
137 rodId = 0xFFFF;
138 }
139
140 if(!check && (id & 0x70) == 0){
142 if( id & 1 ) {
143 rodId = (((id & 0xf) >> 1) | 0x10);
144 } else {
145 rodId = (((id & 0xf) >> 1) | 0x18);
146 }
147 }
148
150}
◆ onlineId() [1/2]
| bool CSCcablingSvc::onlineId |
( |
const uint16_t | offlineID, |
|
|
uint16_t & | rodId ) const |
Definition at line 59 of file CSCcablingSvc.cxx.
59 {
60
62 switch ( offlineID ) {
63 case 0x0 :
64 rodId = 0x0005;
65 break;
66 case 0x1 :
67 rodId = 0x0007;
68 break;
69 case 0x2 :
70 rodId = 0x0009;
71 break;
72 case 0x3 :
73 rodId = 0x0011;
74 break;
75 case 0x4 :
76 rodId = 0x0015;
77 break;
78 case 0x5 :
79 rodId = 0x0017;
80 break;
81 case 0x6 :
82 rodId = 0x0019;
83 break;
84 case 0x7 :
85 rodId = 0x0021;
86 break;
89 rodId = 0xFFFF;
90 }
91
92 if((offlineID & 0x1F) & 0x10){
94
95 rodId = 0x80 | (0xF & offlineID);
96 }
98}
◆ onlineId() [2/2]
| bool CSCcablingSvc::onlineId |
( |
const uint16_t | subdetectorID, |
|
|
const uint16_t | offlineID, |
|
|
uint32_t & | rodId ) const |
map offline ROD identifier to online ID
Definition at line 50 of file CSCcablingSvc.cxx.
50 {
51
52 bool check = subDetectorID == 0x6A || subDetectorID == 0x69;
55 rodId = (subDetectorID << 16) | id;
57}
bool onlineId(const uint16_t subdetectorID, const uint16_t offlineID, uint32_t &rodId) const
map offline ROD identifier to online ID
◆ m_max
| unsigned int CSCcablingSvc::m_max {32} |
|
private |
◆ m_rod
| unsigned int CSCcablingSvc::m_rod {16} |
|
private |
◆ m_run1
| Gaudi::Property<bool> CSCcablingSvc::m_run1 {this, "Run1Cabling", false} |
|
private |
◆ m_side
| unsigned int CSCcablingSvc::m_side {2} |
|
private |
The documentation for this class was generated from the following files: