#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 180 of file CSCcablingSvc.cxx.
180 {
181
182 uint16_t subId = (subDetectorId == 0x6A) ? 0 : 1;
184
185
186
187 if((rodId & 0x10) == 0x10){
188 onlineColId = subId*this->
nROD() + rodId - 16;
189 } else {
190 onlineColId = subId*this->
nROD() + rodId;
191 }
192
193 return onlineColId;
194}
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 357 of file CSCcablingSvc.cxx.
357 {
360
363
365}
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 196 of file CSCcablingSvc.cxx.
196 {
198 switch (hashid){
199 case 0:
200 case 16:
201 case 8:
202 case 24:
203 robid = 0x05;
204 break;
205 case 1:
206 case 17:
207 case 9:
208 case 25:
209 robid = 0x07;
210 break;
211 case 2:
212 case 18:
213 case 10:
214 case 26:
215 robid = 0x09;
216 break;
217 case 3:
218 case 19:
219 case 11:
220 case 27:
221 robid = 0x11;
222 break;
223 case 4:
224 case 20:
225 case 12:
226 case 28:
227 robid = 0x15;
228 break;
229 case 5:
230 case 21:
231 case 13:
232 case 29:
233 robid = 0x17;
234 break;
235 case 6:
236 case 22:
237 case 14:
238 case 30:
239 robid = 0x19;
240 break;
241 case 7:
242 case 23:
243 case 15:
244 case 31:
245 robid = 0x21;
246 break;
247 default:
248 robid = 0xffff;
249 break;
250 }
251 } else {
252 switch (hashid){
253 case 16:
254 case 24:
255 robid = 0x80;
256 break;
257 case 17:
258 case 25:
259 robid = 0x82;
260 break;
261 case 18:
262 case 26:
263 robid = 0x84;
264 break;
265 case 19:
266 case 27:
267 robid = 0x86;
268 break;
269 case 20:
270 case 28:
271 robid = 0x88;
272 break;
273 case 21:
274 case 29:
275 robid = 0x8a;
276 break;
277 case 22:
278 case 30:
279 robid = 0x8c;
280 break;
281 case 23:
282 case 31:
283 robid = 0x8e;
284 break;
285 case 0:
286 case 8:
287 robid = 0x81;
288 break;
289 case 1:
290 case 9:
291 robid = 0x83;
292 break;
293 case 2:
294 case 10:
295 robid = 0x85;
296 break;
297 case 3:
298 case 11:
299 robid = 0x87;
300 break;
301 case 4:
302 case 12:
303 robid = 0x89;
304 break;
305 case 5:
306 case 13:
307 robid = 0x8b;
308 break;
309 case 6:
310 case 14:
311 robid = 0x8d;
312 break;
313 case 7:
314 case 15:
315 robid = 0x8f;
316 break;
317 default:
318 robid = 0xffff;
319 break;
320 }
321 }
322}
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 347 of file CSCcablingSvc.cxx.
347 {
350
353
354 robid = (subdetectorid << 16) | shortRobID;
355}
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 326 of file CSCcablingSvc.cxx.
326 {
328 rodid = hashid & 7;
329 } else {
330 if (hashid<8)
331 rodid = hashid;
332 else if (hashid<24)
333 rodid = hashid-8;
334 else
335 rodid = hashid-16;
336 rodid |= 0x10;
337 }
338}
◆ 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 340 of file CSCcablingSvc.cxx.
340 {
341 if ((hashid >= 8 && hashid <= 15) || (hashid >= 24))
342 subdetectorid = 0x69;
343 else
344 subdetectorid = 0x6a;
345}
◆ initialize()
| StatusCode CSCcablingSvc::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 19 of file CSCcablingSvc.cxx.
19 {
20
21
22 SmartIF<IRDBAccessSvc> rdbAccess{service("RDBAccessSvc")};
24
25 SmartIF<IGeoModelSvc> geoModel{service("GeoModelSvc")};
26 if (!geoModel) {
28 } else {
29
30 std::string atlasVersion = geoModel->atlasVersion();
31
32 IRDBRecordset_ptr atlasCommonRec = rdbAccess->getRecordsetPtr(
"AtlasCommon",atlasVersion,
"ATLAS");
33 if(atlasCommonRec->
size()==0) {
35 } else {
36 std::string configVal = (*atlasCommonRec)[0]->getString("CONFIG");
37 if(configVal=="RUN1"){
39 } else if(configVal=="RUN2" || configVal=="RUN3" || configVal=="RUN4") {
41 } else {
42 ATH_MSG_FATAL(
"Unexpected value for geometry config read from the database: " << configVal);
43 return StatusCode::FAILURE;
44 }
45 }
46 }
49
50 return StatusCode::SUCCESS;
51}
#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 169 of file CSCcablingSvc.cxx.
169 {
170
171 bool check = rodId == 0x0 || rodId == 0x1 || rodId == 0x2 || rodId == 0x3 ||
172 rodId == 0x4 || rodId == 0x5 || rodId == 0x6 || rodId == 0x7;
173
174
175 if((0x10 & rodId)==0x10)
check =
true;
177}
◆ is_rodId()
| bool CSCcablingSvc::is_rodId |
( |
const uint16_t | rodId | ) |
const |
check that we have the correct online ROD id
Definition at line 157 of file CSCcablingSvc.cxx.
157 {
158
159 bool check = rodId == 0x5 || rodId == 0x7 || rodId == 0x9 || rodId == 0x11 ||
160 rodId == 0x15 || rodId == 0x17 || rodId == 0x19 || rodId == 0x21;
161
162
163 if((rodId & 0x70) == 0)
check =
true;
164
166}
◆ 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 105 of file CSCcablingSvc.cxx.
105 {
107 uint16_t id = onlineIdentifier & 0xFFFF;
108 switch ( id ) {
109 case 0x0005 :
110 rodId = 0x0;
111 break;
112 case 0x0007 :
113 rodId = 0x1;
114 break;
115 case 0x0009 :
116 rodId = 0x2;
117 break;
118 case 0x0011 :
119 rodId = 0x3;
120 break;
121 case 0x0015 :
122 rodId = 0x4;
123 break;
124 case 0x0017 :
125 rodId = 0x5;
126 break;
127 case 0x0019 :
128 rodId = 0x6;
129 break;
130 case 0x0021 :
131 rodId = 0x7;
132 break;
133 case 0x000A :
134 rodId = 0x0;
135 break;
136 case 0x000C :
137 rodId = 0x1;
138 break;
141 rodId = 0xFFFF;
142 }
143
144 if(!check && (id & 0x70) == 0){
146 if( id & 1 ) {
147 rodId = (((id & 0xf) >> 1) | 0x10);
148 } else {
149 rodId = (((id & 0xf) >> 1) | 0x18);
150 }
151 }
152
154}
◆ onlineId() [1/2]
| bool CSCcablingSvc::onlineId |
( |
const uint16_t | offlineID, |
|
|
uint16_t & | rodId ) const |
Definition at line 63 of file CSCcablingSvc.cxx.
63 {
64
66 switch ( offlineID ) {
67 case 0x0 :
68 rodId = 0x0005;
69 break;
70 case 0x1 :
71 rodId = 0x0007;
72 break;
73 case 0x2 :
74 rodId = 0x0009;
75 break;
76 case 0x3 :
77 rodId = 0x0011;
78 break;
79 case 0x4 :
80 rodId = 0x0015;
81 break;
82 case 0x5 :
83 rodId = 0x0017;
84 break;
85 case 0x6 :
86 rodId = 0x0019;
87 break;
88 case 0x7 :
89 rodId = 0x0021;
90 break;
93 rodId = 0xFFFF;
94 }
95
96 if((offlineID & 0x1F) & 0x10){
98
99 rodId = 0x80 | (0xF & offlineID);
100 }
102}
◆ 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 54 of file CSCcablingSvc.cxx.
54 {
55
56 bool check = subDetectorID == 0x6A || subDetectorID == 0x69;
59 rodId = (subDetectorID << 16) | id;
61}
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: