18 SmartIF<IRDBAccessSvc> rdbAccess{service(
"RDBAccessSvc")};
21 SmartIF<IGeoModelSvc> geoModel{service(
"GeoModelSvc")};
26 std::string atlasVersion = geoModel->atlasVersion();
28 IRDBRecordset_ptr atlasCommonRec = rdbAccess->getRecordsetPtr(
"AtlasCommon",atlasVersion,
"ATLAS");
29 if(atlasCommonRec->
size()==0) {
32 std::string configVal = (*atlasCommonRec)[0]->getString(
"CONFIG");
33 if(configVal==
"RUN1"){
35 }
else if(configVal==
"RUN2" || configVal==
"RUN3" || configVal==
"RUN4") {
38 ATH_MSG_FATAL(
"Unexpected value for geometry config read from the database: " << configVal);
39 return StatusCode::FAILURE;
46 return StatusCode::SUCCESS;
52 bool check = subDetectorID == 0x6A || subDetectorID == 0x69;
54 check = check && this->
onlineId(offlineID,
id);
55 rodId = (subDetectorID << 16) |
id;
62 switch ( offlineID ) {
92 if((offlineID & 0x1F) & 0x10){
95 rodId = 0x80 | (0xF & offlineID);
103 uint16_t
id = onlineIdentifier & 0xFFFF;
140 if(!check && (
id & 0x70) == 0){
143 rodId = (((
id & 0xf) >> 1) | 0x10);
145 rodId = (((
id & 0xf) >> 1) | 0x18);
155 bool check = rodId == 0x5 || rodId == 0x7 || rodId == 0x9 || rodId == 0x11 ||
156 rodId == 0x15 || rodId == 0x17 || rodId == 0x19 || rodId == 0x21;
159 if((rodId & 0x70) == 0) check =
true;
167 bool check = rodId == 0x0 || rodId == 0x1 || rodId == 0x2 || rodId == 0x3 ||
168 rodId == 0x4 || rodId == 0x5 || rodId == 0x6 || rodId == 0x7;
171 if((0x10 & rodId)==0x10) check =
true;
178 uint16_t subId = (subDetectorId == 0x6A) ? 0 : 1;
179 uint16_t onlineColId = subId*this->
nROD()+rodId;
183 if((rodId & 0x10) == 0x10){
184 onlineColId = subId*this->
nROD() + rodId - 16;
186 onlineColId = subId*this->
nROD() + rodId;
337 if ((hashid >= 8 && hashid <= 15) || (hashid >= 24))
338 subdetectorid = 0x69;
340 subdetectorid = 0x6a;
344 uint32_t shortRobID = 0xffff;
347 uint32_t subdetectorid = 0;
350 robid = (subdetectorid << 16) | shortRobID;
354 uint32_t rodid = 0xffff;
357 uint32_t subdetectorid = 0;
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition of the abstract IRDBAccessSvc interface.
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
Definition of the abstract IRDBRecord interface.
Definition of the abstract IRDBRecordset interface.
Gaudi::Property< bool > m_run1
void hash2Rob(const unsigned int &, uint32_t &) const
map PRD collection ID into short ROB ID, e.g.
bool onlineId(const uint16_t subdetectorID, const uint16_t offlineID, uint32_t &rodId) const
map offline ROD identifier to online ID
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
uint16_t collectionId(const uint16_t subdetectorId, const uint16_t rodId) const
calculate the collection Identifier
unsigned int nROD() const
bool is_offlineRodId(const uint16_t rodId) const
check that we have the correct offline ROD id
bool is_rodId(const uint16_t rodId) const
check that we have the correct online ROD id
bool offlineId(const uint32_t onlineIdentifier, uint16_t &rodId) const
reverse map of online ID into offline ROD ID
void hash2CollectionId(const unsigned int &, uint16_t &) const
map PRD collection ID into RDO collection ID
void hash2SubdetectorId(const unsigned int &, uint32_t &) const
map PRD collection ID into subdetector ID, i.e.
virtual StatusCode initialize() override
virtual unsigned int size() const =0