ATLAS Offline Software
RpcCablingCondAlg.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3  */
4 
7 
8 #include <sstream>
9 
11 
12 RpcCablingCondAlg::RpcCablingCondAlg(const std::string& name, ISvcLocator* pSvcLocator) : AthAlgorithm(name, pSvcLocator) {}
13 
15  ATH_MSG_DEBUG("initializing" << name());
21  ATH_CHECK(m_idHelperSvc.retrieve());
22  return StatusCode::SUCCESS;
23 }
24 
26 
27  const EventContext& ctx = Gaudi::Hive::currentContext();
28  ATH_MSG_DEBUG("executing" << name());
29 
31  if (writeHandle.isValid()) {
32  ATH_MSG_DEBUG("CondHandle " << writeHandle.fullKey() << " is already valid."
33  << ". In theory this should not be called, but may happen"
34  << " if multiple concurrent events are being processed out of order.");
35  return StatusCode::SUCCESS;
36  }
37 
38  // read in the 4 different cond objects:
39  // map
41  const CondAttrListCollection* readCdoMap{*readHandle_map_schema};
42  if (!readCdoMap) {
43  ATH_MSG_FATAL("Null pointer to the read conditions object");
44  return StatusCode::FAILURE;
45  }
46  writeHandle.addDependency(readHandle_map_schema);
47  ATH_MSG_DEBUG("Size of CondAttrListCollection readCdoMap->size()= " << readCdoMap->size());
48 
49  // corr
51  const CondAttrListCollection* readCdoCorr{*readHandle_map_schema_corr};
52  if (!readCdoCorr) {
53  ATH_MSG_FATAL("Null pointer to the read conditions object");
54  return StatusCode::FAILURE;
55  }
56  ATH_MSG_DEBUG("Size of CondAttrListCollection readCdoMap_corr->size()= " << readCdoCorr->size());
57  writeHandle.addDependency(readHandle_map_schema_corr);
58 
59  // EtaTable
61  const CondAttrListCollection* readCdoEta{*readHandle_cm_thr_eta};
62  if (!readCdoEta) {
63  ATH_MSG_FATAL("Null pointer to the read conditions object");
64  return StatusCode::FAILURE;
65  }
66  ATH_MSG_DEBUG("Size of CondAttrListCollection readCdo_cm_thr_eta->size()= " << readCdoEta->size());
67  writeHandle.addDependency(readHandle_cm_thr_eta);
68 
69  // phiTable
71  const CondAttrListCollection* readCdoPhi{*readHandle_cm_thr_phi};
72  if (!readCdoPhi) {
73  ATH_MSG_FATAL("Null pointer to the read conditions object");
74  return StatusCode::FAILURE;
75  }
76  ATH_MSG_DEBUG("Size of CondAttrListCollection readCdo_cm_thr_phi->size()= " << readCdoPhi->size());
77  writeHandle.addDependency(readHandle_cm_thr_phi);
78 
79  std::unique_ptr<RpcCablingCondData> writeCdo{std::make_unique<RpcCablingCondData>()};
80  ATH_CHECK(setup(readCdoMap, readCdoCorr, readCdoEta, readCdoPhi, writeCdo.get()));
81 
82  if (writeHandle.record(std::move(writeCdo)).isFailure()) {
83  ATH_MSG_FATAL("Could not record RpcCondCablingData " << writeHandle.key() << " with EventRange " << writeHandle.getRange()
84  << " into Conditions Store");
85  return StatusCode::SUCCESS;
86  }
87 
88  ATH_MSG_INFO("recorded new " << writeHandle.key() << " with range " << writeHandle.getRange());
89  return StatusCode::SUCCESS;
90 }
91 
93  const CondAttrListCollection* readCdoEta, const CondAttrListCollection* readCdoPhi,
94  RpcCablingCondData* writeCdo) const {
95  ATH_MSG_DEBUG("starting setup()");
96 
97  int maxType = 0;
98  sectorMap_t sectorMap;
99  RpcCablingCondData::STvec sectorType;
100  std::vector<unsigned short int> feedPadThresholds;
101  std::map<std::string, std::string> trigroads;
102  SLmap_t sectorLogic;
103 
104  // ------------------------------
105  // readCdoMap
106  // ------------------------------
107  ATH_MSG_INFO("setup() - Reading " << m_readKey_map_schema.key());
108  const coral::AttributeList& atr_map = readCdoMap->attributeList(1); // All data sits in cool channel 1
109  std::stringstream MAP(atr_map["Map"].data<std::string>());
110 
111  // ------------------------------
112  // readCdoCorr
113  // ------------------------------
114  ATH_MSG_INFO("setup() - Reading " << m_readKey_map_schema_corr.key());
115  const coral::AttributeList& atr_map_corr = readCdoCorr->attributeList(1); // All data sits in cool channel 1
116  std::stringstream MAP_corr(atr_map_corr["Map"].data<std::string>());
117 
118  // ------------------------------
119  // readCdoEta
120  // ------------------------------
121  ATH_MSG_INFO("setup() - Reading " << m_readKey_cm_thr_eta.key());
122  std::string etaCM_File;
123  std::string etaTh0;
125  for (itr_eta = readCdoEta->begin(); itr_eta != readCdoEta->end(); ++itr_eta) {
126  const coral::AttributeList& atr = itr_eta->second;
127  etaCM_File = *(static_cast<const std::string*>((atr["CM_File"]).addressOfData()));
128  etaTh0 = *(static_cast<const std::string*>((atr["Th0"]).addressOfData()));
129  trigroads[etaCM_File] = etaTh0;
130  }
131 
132  // ------------------------------
133  // readCdoPhi
134  // ------------------------------
135  ATH_MSG_INFO("setup() - Reading " << m_readKey_cm_thr_phi.key());
136  std::string phiCM_File;
137  std::string phiTh0;
139  for (itr = readCdoPhi->begin(); itr != readCdoPhi->end(); ++itr) {
140  const coral::AttributeList& atr = itr->second;
141  phiCM_File = *(static_cast<const std::string*>((atr["CM_File"]).addressOfData()));
142  phiTh0 = *(static_cast<const std::string*>((atr["Th0"]).addressOfData()));
143  trigroads[phiCM_File] = phiTh0;
144  }
145  // ------------------------------
146 
147  DBline data(MAP);
148  // store the setup environment
149  std::string version, setup, layout;
150 
151  // Start reading routine
152  unsigned int nlines = 0;
153 
154  std::string dataName = PathResolver::find_directory(m_database_repository, "DATAPATH");
155 
156  // Start reading routine
157  while (++data) {
158  ATH_MSG_DEBUG("setup() - Reading routine. nlines = " << nlines);
159  ++nlines;
160  data("Version") >> version >> setup >> layout;
161 
162  // Read the Sector Type enumeration
163  int start = 0;
164  int stop = 0;
165  if (data("SECTOR TYPES (") >> start >> "-" >> stop >> "):") {
166  for (int i = start; i <= stop; ++i) { data >> sectorMap[i]; }
167  }
168 
169  // Set the maxType variable and the type of SectorMap objects
170  if (stop == 63 || stop == 8) {
171  for (int i = 0; i < 64; ++i) { maxType = std::max(sectorMap[i], maxType); }
172  sectorType.clear();
173  //sectorType.reserve(maxType); // this would require a copy-constructor
174  ATH_MSG_DEBUG("setup() - Loop over " << maxType << " sector-types");
175 
176  for (int i = 1; i <= maxType; ++i) {
177  sectorType.emplace_back(i, dataName, layout, m_cosmic_configuration);
178  RPC_CondCabling::SectorLogicSetup& sec = sectorType[i - 1];
179  sec.SetPtoTrigRoads(&trigroads);
180  for (int j = 0; j < 64; ++j) {
181  if (sectorMap[j] == i) {
182  sec << j;
183  sectorLogic.insert(SLmap_t::value_type(j, &sec));
184  ATH_MSG_DEBUG("setup() - filling sectorLogicSetup Map for type " << i << " sector " << j);
185  }
186  }
187  }
188  }
189 
190  // Loop on GEOMETRY TYPES
191  for (int i = 1; i <= maxType; ++i) {
192  // Read the RPC geometry
193  if (data("RPC GEOM # :", i)) {
195  if (!(sectorType[i - 1] += RPCdata)) return StatusCode::FAILURE;
196  }
197  // Read the Wired OR geometry
198  if (data("WIRED OR # :", i)) {
200  if (!(sectorType[i - 1] += WORdata)) return StatusCode::FAILURE;
201  }
202  // Read the CMAs segmentation
203  if (data("CMAs # : pivot segmentation", i)) {
205  if (!(sectorType[i - 1] += CMAdata)) return StatusCode::FAILURE;
206  }
207  // Read the CMAs cabling
208  if (data("CMAs # : eta cabling", i)) {
210  if (!(sectorType[i - 1] += CMAdata)) return StatusCode::FAILURE;
211  }
212  }
213  }
214  ATH_MSG_DEBUG("setup() - map n. of lines read is " << nlines);
215  ATH_MSG_INFO("setup() - version is " << version << " " << setup << " " << layout << " (cosmic=" << (int)m_cosmic_configuration << ")");
216 
217  for (int i = 1; i <= maxType; ++i) {
218  if (!sectorType[i - 1].setup(msg())) return StatusCode::FAILURE;
219  if (!sectorType[i - 1].check()) return StatusCode::FAILURE;
220  if (msgLvl(MSG::DEBUG)) {
221  ATH_MSG_DEBUG("calling get_cabling for i=" << i);
222  const RPC_CondCabling::SectorLogicSetup::EtaCMAmap& CMAs = sectorType[i - 1].giveEtaCMA();
223  for (const auto& cma : CMAs) {
224  unsigned int cabling = UINT_MAX;
225  if (cma.second.get_cabling(CMAinput::Pivot, 0, 0, 0, cabling)) {
226  ATH_MSG_DEBUG("got pivot cabling=" << cabling);
227  } else {
228  ATH_MSG_DEBUG("failed to get cabling");
229  }
230  }
231  }
232  }
233 
234  ATH_MSG_DEBUG("setup() - " << m_readKey_map_schema.key() << " maps have been parsed");
235 
236  for (int sector = 0; sector < 64; ++sector) {
237  unsigned int nRDOentries = 0;
238  int side = (sector < 32) ? 0 : 1;
239  int logic_sector = sector % 32;
240 
241  if (sectorMap[sector]) {
242  // get the Sector Logic Setup
243  const RPC_CondCabling::SectorLogicSetup& Sector = sectorType[sectorMap[sector] - 1];
244 
245  // get the Eta CMA map from the Sector Logic Setup
247  RPC_CondCabling::SectorLogicSetup::EtaCMAmap::const_iterator it = CMAs.begin();
248 
249  bool isFirst = false;
250 
251  // loop over the whole set of Eta CMAs
252  while (it != CMAs.end()) {
253  // get the set of parameters for idenfying the first RPC strip
254  unsigned int ID = (*it).second.id().Ixx_index();
255  bool inversion = (*it).second.inversion();
256  isFirst = (ID == 1 && inversion) || (ID == 0 && !inversion);
257  unsigned int PADid = (*it).first.PAD_index();
258  unsigned int cabling = UINT_MAX;
259  if ((*it).second.get_cabling(CMAinput::Pivot, 0, 0, 0, cabling)) {
260  unsigned int RPC_strip = cabling % 100;
261  unsigned int RPC_chamber = (cabling / 100) % 100;
262  unsigned int RPC_layer = 0;
263  unsigned int RPC_station = (*it).second.whichCMAstation(CMAinput::Pivot);
264  unsigned int lvl1_sector = sector;
265 
266  const RPC_CondCabling::RPCchamber* rpc = Sector.find_chamber(RPC_station, RPC_chamber);
267  std::string name = rpc->stationName();
268  int sEta = (side) ? rpc->stationEta() : -rpc->stationEta();
269  int sPhi = (logic_sector == 31) ? 1 : (logic_sector + 1) / 4 + 1;
270  int dR = rpc->doubletR();
271  int dZ = rpc->doubletZ();
272  int dP = (rpc->phiReadoutPannels() == 2) ? (logic_sector + 1) % 2 + 1 : 1;
273 
274  // build the Level-1 code index
275  RPCdecoder decode(Eta, lvl1_sector, RPC_station, RPC_layer, RPC_chamber, RPC_strip);
276 
277  // instanciate the corresponding RDO index
278  RDOindex rdo(PADid, decode.code(), name, sEta, sPhi, dR, dZ, dP, m_idHelperSvc->rpcIdHelper());
279 
280  // compute the key for retrieving RDO into the map
281  int key = side * 10000 + logic_sector * 100 + PADid;
282  // insert the RDO into the map
283  std::pair<RpcCablingCondData::RDOmap::iterator, bool> ins =
284  writeCdo->m_RDOs.insert(RpcCablingCondData::RDOmap::value_type(key, rdo));
285 
286  if (!ins.second) {
287  ATH_MSG_ERROR("RpcCablingCondData::RDOmap is false for stationName="
288  << name << ", stationEta=" << sEta << ", stationPhi=" << sPhi << ", doubletR=" << dR
289  << ", doubletZ=" << dZ << ", doubletPhi=" << dP);
290  return StatusCode::FAILURE;
291  }
292 
293  ++nRDOentries;
294  }
295 
296  else if (!(*it).second.get_cabling(CMAinput::Pivot, 0, 0, 0, cabling) && isFirst) {
297  // try to catch configrm cabling
298  bool existLow = false;
299  bool existHigh = false;
300 
301  if (!(existLow = (*it).second.get_cabling(CMAinput::LowPt, 0, 0, 0, cabling)))
302  existHigh = (*it).second.get_cabling(CMAinput::HighPt, 0, 0, 0, cabling);
303 
304  if (!existLow && !existHigh) {
305  ATH_MSG_ERROR("Error while configuring the RDO map");
306  return StatusCode::FAILURE;
307  }
308 
309  unsigned int RPC_strip = cabling % 100;
310  unsigned int RPC_chamber = (cabling / 100) % 100;
311  unsigned int RPC_layer = 0;
312  unsigned int RPC_station = 0;
313  if (existLow)
314  RPC_station = (*it).second.whichCMAstation(CMAinput::LowPt);
315  else
316  RPC_station = (*it).second.whichCMAstation(CMAinput::HighPt);
317  unsigned int lvl1_sector = sector;
318 
319  const RPC_CondCabling::RPCchamber* rpc = Sector.find_chamber(RPC_station, RPC_chamber);
320  std::string name = rpc->stationName();
321  int sEta = (side) ? rpc->stationEta() : -rpc->stationEta();
322  int sPhi = (logic_sector == 31) ? 1 : (logic_sector + 1) / 4 + 1;
323  int dR = rpc->doubletR();
324  int dZ = rpc->doubletZ();
325  int dP = (rpc->phiReadoutPannels() == 2) ? (logic_sector + 1) % 2 + 1 : 1;
326 
327  // build the Level-1 code index
328  RPCdecoder decode(Eta, lvl1_sector, RPC_station, RPC_layer, RPC_chamber, RPC_strip);
329 
330  // instanciate the corresponding RDO index
331  RDOindex rdo(PADid, decode.code(), name, sEta, sPhi, dR, dZ, dP, m_idHelperSvc->rpcIdHelper());
332 
333  // compute the key for retrieving RDO into the map
334  int key = side * 10000 + logic_sector * 100 + PADid;
335 
336  // insert the RDO into the map
337  std::pair<RpcCablingCondData::RDOmap::iterator, bool> ins =
338  writeCdo->m_RDOs.insert(RpcCablingCondData::RDOmap::value_type(key, rdo));
339 
340  if (!ins.second) {
341  ATH_MSG_ERROR("RpcCablingCondData::RDOmap is false for stationName="
342  << name << ", stationEta=" << sEta << ", stationPhi=" << sPhi << ", doubletR=" << dR
343  << ", doubletZ=" << dZ << ", doubletPhi=" << dP);
344  return StatusCode::FAILURE;
345  }
346 
347  ++nRDOentries;
348  }
349 
350  // increase the iterator
351  while (it != CMAs.end() && (unsigned int)(*it).first.PAD_index() == PADid) { ++it; }
352  }
353  }
354  ATH_MSG_DEBUG("setup() - sector " << sector << ", number of associated RDO (i.e. Pads) = " << nRDOentries);
355  }
356 
357  DBline data_corr(MAP_corr);
358  nlines = 0;
359  while (++data_corr) {
360  ++nlines;
361  unsigned short int SubId;
362  unsigned short int SecId;
363  unsigned short int PADId;
364  unsigned short int CMAId;
365  unsigned short int ijk;
366  unsigned short int inputType;
367  unsigned int layer;
368  unsigned int type;
369  unsigned short int Channel1;
370  unsigned short int Channel2;
371  int Number;
372 
373  if (data_corr("CABLE") >> data_corr.dbhex() >> SubId >> SecId >> PADId >> CMAId >> ijk >> data_corr.dbdec() >> type >> Channel1 >>
374  Channel2 >> Number) {
375  bool ok = CableParamCheck(SubId, SecId, PADId, CMAId, ijk, type, Channel1, Channel2, Number);
376 
377  layer = (ijk == 0 || ijk == 2 || ijk == 3) ? 0 : 1;
378 
379  if (ijk > 1) {
380  Channel1 += 32 * (ijk % 2);
381  Channel2 += 32 * (ijk % 2);
382  }
383 
384  unsigned short int lh = (CMAId >> 2) & 1;
385 
386  if (ijk == 0 || ijk == 1)
387  inputType = 1;
388  else
389  inputType = (lh) ? 2 : 0;
390 
391  if (ijk > 5) inputType = 3;
392  if (type > 3) type = 4;
393 
394  if (ok && !correct(SubId, SecId, PADId, CMAId, static_cast<CMAinput>(inputType), layer, Channel1, Channel2, Number,
395  static_cast<L1RPCcabCorrection>(type), sectorMap, sectorType)) {
396  ATH_MSG_WARNING("Cannot apply correction: "
397  << std::hex << std::setw(4) << std::showbase << SubId << " " << std::setw(4) << std::showbase << SecId
398  << " " << std::setw(3) << std::showbase << PADId << " " << std::setw(3) << std::showbase << CMAId << " "
399  << std::setw(3) << std::showbase << ijk << " " << std::dec << std::setw(1) << std::showbase << type << " "
400  << std::setw(2) << std::showbase << Channel1 << " " << std::setw(2) << std::showbase << Channel2 << " "
401  << std::setw(2) << std::showbase << Number);
402  }
403  }
404  if (data_corr("BOARD") >> data_corr.dbhex() >> SubId >> SecId >> PADId >> CMAId >> data_corr.dbdec() >> inputType >> layer >>
405  type >> Channel1 >> Channel2 >> Number) {
406  bool ok = BoardParamCheck(SubId, SecId, PADId, CMAId, inputType, layer, type, Channel1, Channel2, Number);
407 
408  if (inputType > 2) inputType = 3;
409  if (type > 3) type = 4;
410 
411  if (ok && !correct(SubId, SecId, PADId, CMAId, static_cast<CMAinput>(inputType), layer, Channel1, Channel2, Number,
412  static_cast<L1RPCcabCorrection>(type), sectorMap, sectorType)) {
413  ATH_MSG_WARNING("Cannot apply correction: "
414  << std::hex << std::setw(4) << std::showbase << SubId << " " << std::setw(4) << std::showbase << SecId
415  << " " << std::setw(3) << std::showbase << PADId << " " << std::setw(3) << std::showbase << CMAId << " "
416  << std::dec << std::setw(1) << inputType << " " << std::setw(1) << layer << " " << std::dec << std::setw(1)
417  << std::showbase << type << " " << std::setw(2) << std::showbase << Channel1 << " " << std::setw(2)
418  << std::showbase << Channel2 << " " << std::setw(2) << std::showbase << Number);
419  }
420  }
421  }
422  ATH_MSG_DEBUG("setup() - corrected map n. of lines read is " << nlines);
423  ATH_MSG_DEBUG("setup() - " << m_readKey_map_schema_corr.key() << " maps have been parsed");
424 
425  for (int side = 0; side < 2; ++side) {
426  for (int rod = 0; rod < 16; ++rod) { (writeCdo->m_rod2hash[side][rod]).clear(); }
427  }
428 
429  int hashID = 0;
430  std::set<uint32_t> ROBid;
431  IdContext rpcModuleContext = m_idHelperSvc->rpcIdHelper().module_context();
432 
433  // reserve enough space in the hash-vector
434  writeCdo->m_HashVec.reserve(writeCdo->m_RDOs.size());
435 
436  ATH_MSG_INFO("setup() - start building OfflineOnlineMap for " << writeCdo->m_RDOs.size() << " RDOs");
437 
438  RpcCablingCondData::RDOmap::iterator pad_beg = writeCdo->m_RDOs.begin();
439  RpcCablingCondData::RDOmap::iterator pad_end = writeCdo->m_RDOs.end();
440  for (; pad_beg != pad_end; ++pad_beg) {
441  const RDOindex* pRDOindex = &((*pad_beg).second);
442  (*pad_beg).second.set_hash(hashID);
443 
444  // get pointer to RDOindex class
445  writeCdo->m_HashVec.push_back(pRDOindex);
446 
447  if (writeCdo->m_HashVec.size() != pRDOindex->hash() + 1) {
448  ATH_MSG_ERROR("Size of hash vector and RDO hash does not match");
449  return StatusCode::FAILURE;
450  }
451 
452  // calculate m_fullListOfRobIds
453  const unsigned short int rob_id = pRDOindex->ROBid();
454  const unsigned short int rod_id = pRDOindex->RODid();
455  const unsigned short int sub_id = pRDOindex->side();
456  const unsigned short int sec_id = pRDOindex->SLid();
457  const unsigned short int pad_id = pRDOindex->PADid();
458 
459  uint32_t ROD_ID = (sub_id << 16) | rod_id;
460  uint32_t ROB_ID = (sub_id << 16) | rob_id;
461 
462  ROBid.insert(ROB_ID);
463  unsigned short int sub_id_index = ((sub_id == 0x65) ? 1 : 0); // convert 0x65 -> 1 (side A) and 0x66 -> 0 (side C)
464 
465  Identifier id;
466  pRDOindex->pad_identifier(id);
467 
468  ATH_MSG_DEBUG(hashID << "-th entry has sub_id_index=" << sub_id_index << ", ROBid=" << rob_id << ", RODid=" << rod_id << ", side="
469  << sub_id << ", SLid=" << sec_id << ", PADid=" << pad_id << ", pad_identifier=" << id.get_compact());
470 
471  // build the offline_id vector
472  writeCdo->m_offline_id[sub_id_index][sec_id][pad_id] = id;
473 
474  // build the map
475  std::pair<RpcCablingCondData::OfflineOnlineMap::iterator, bool> ins =
476  writeCdo->m_RDOmap.insert(RpcCablingCondData::OfflineOnlineMap::value_type(id, pRDOindex));
477  ATH_MSG_DEBUG("OfflineOnlineMap new entry: Identifier with technology="
478  << m_idHelperSvc->rpcIdHelper().technology(id) << ", stationName=" << m_idHelperSvc->rpcIdHelper().stationName(id)
479  << ", stationEta=" << m_idHelperSvc->rpcIdHelper().stationEta(id) << ", stationPhi="
480  << m_idHelperSvc->rpcIdHelper().stationPhi(id) << ", doubletR=" << m_idHelperSvc->rpcIdHelper().doubletR(id)
481  << ", doubletZ=" << m_idHelperSvc->rpcIdHelper().doubletZ(id) << ", doubletPhi="
482  << m_idHelperSvc->rpcIdHelper().doubletPhi(id) << " and hash of the RDOindex(key)= " << pRDOindex->hash());
483  if (!ins.second) {
484  ATH_MSG_ERROR("RpcCablingCondData::OfflineOnlineMap is false for technology="
485  << m_idHelperSvc->rpcIdHelper().technology(id) << ", stationName=" << m_idHelperSvc->rpcIdHelper().stationName(id)
486  << ", stationEta=" << m_idHelperSvc->rpcIdHelper().stationEta(id) << ", stationPhi="
487  << m_idHelperSvc->rpcIdHelper().stationPhi(id) << ", doubletR=" << m_idHelperSvc->rpcIdHelper().doubletR(id)
488  << ", doubletZ=" << m_idHelperSvc->rpcIdHelper().doubletZ(id) << ", doubletPhi="
489  << m_idHelperSvc->rpcIdHelper().doubletPhi(id) << " and hash of the RDOindex(key)= " << pRDOindex->hash());
490  return StatusCode::FAILURE;
491  }
492 
493  // build the ROB->RDO map
494  std::pair<std::set<IdentifierHash>::iterator, bool> insert_ROB_RDO_returnVal =
495  writeCdo->m_ROB_RDO_map[ROB_ID].insert(IdentifierHash(pRDOindex->hash()));
496  if (insert_ROB_RDO_returnVal.second)
497  ATH_MSG_DEBUG("A new RDO HashId = " << pRDOindex->hash() << " registered for ROB Id = " << ROB_ID);
498  else
499  ATH_MSG_VERBOSE("The RDO HashId = " << pRDOindex->hash() << " was already registered for ROB Id = " << ROB_ID);
500 
501  // build the PRD->RDO and PRD->ROB maps
502  ATH_MSG_VERBOSE("Looking for PRDs corresponding to this RDO");
503  std::list<Identifier> strip_id_list;
504  IdentifierHash rdoHashId((IdentifierHash::value_type)pRDOindex->hash());
505  ATH_MSG_DEBUG("RDO HashId = " << (int)rdoHashId << " RDO Id = " << id.get_compact() << " ROB Id = " << MSG::hex << ROB_ID
506  << MSG::dec << " ROD Id = " << MSG::hex << ROD_ID << MSG::dec);
507 
508  for (unsigned short int CMAId : {2, 3, 6, 7}) { // loop over phi CMA IDs
509  for (unsigned short int ijk : {1, 2, 3}) { // loop over IJK identifiers
510  strip_id_list.clear();
511  for (unsigned short int channel : {0, 31}) { // check for the first and the last channel
512  strip_id_list.splice(strip_id_list.end(),
513  give_strip_id(sub_id_index, sec_id, pad_id, CMAId, ijk, channel, sectorMap, sectorType));
514  }
515  for (Identifier strip_id : strip_id_list) {
516  Identifier idp = m_idHelperSvc->rpcIdHelper().parentID(strip_id);
517  IdentifierHash prdHashId;
518  int gethash_code = m_idHelperSvc->rpcIdHelper().get_hash(idp, prdHashId, &rpcModuleContext);
519  if (gethash_code != 0) {
520  ATH_MSG_DEBUG("Unable to get the PRD HashId! parentID(strip_id)=" << idp.getString());
521  continue;
522  }
523 
524  // fill the PRD->RDO map
525  std::pair<std::set<IdentifierHash>::iterator, bool> insertRDO_returnVal =
526  writeCdo->m_PRD_RDO_map[prdHashId].insert(rdoHashId);
527  if (insertRDO_returnVal.second) {
528  ATH_MSG_DEBUG("A new RDO HashId = " << (int)rdoHashId << " registered for PRD HashId = " << (int)prdHashId);
529  } else {
530  ATH_MSG_VERBOSE("The RDO HashId = " << (int)rdoHashId
531  << " was already registered for PRD HashId = " << (int)prdHashId);
532  }
533 
534  // fill the PRD->ROB map
535  std::pair<std::set<uint32_t>::iterator, bool> insertROB_returnVal = writeCdo->m_PRD_ROB_map[prdHashId].insert(ROB_ID);
536  if (insertROB_returnVal.second) {
537  ATH_MSG_DEBUG("A new ROB Id = " << MSG::hex << ROB_ID << MSG::dec
538  << " registered for PRD HashId = " << (int)prdHashId);
539  } else {
540  ATH_MSG_VERBOSE("The ROB Id = " << MSG::hex << ROB_ID << MSG::dec
541  << " was already registered for PRD HashId = " << (int)prdHashId);
542  }
543  }
544  }
545  }
546 
547  // Trigger Roads Header
548  std::map<std::string, std::string>::const_iterator it;
549  it = trigroads.find("infos.txt");
550  if (it == trigroads.end()) {
551  ATH_MSG_WARNING("Missing HEADER FILE infos.txt");
552  } else {
553  ATH_MSG_VERBOSE("======== RPC Trigger Roads from COOL - Header infos ========");
554  ATH_MSG_VERBOSE("\n" + it->second + "\n");
555  // Read FeetPadThresholds from infos.txt
557  std::stringstream ss;
558  ss << it->second;
559  std::string word;
560  while (ss >> word) {
561  if (word == "FeetPadThresholds") {
562  feedPadThresholds.assign(3, 0);
563  ss >> feedPadThresholds.at(0);
564  ss >> feedPadThresholds.at(1);
565  ss >> feedPadThresholds.at(2);
566  ATH_MSG_VERBOSE("FeetPadThresholds set from COOL to: " << feedPadThresholds.at(0) << "," << feedPadThresholds.at(1)
567  << "," << feedPadThresholds.at(2));
568  }
569  }
570  }
571  }
572 
573  // ------ begin like PCcablingInterface::RpcPadIdHash::RpcPadIdHash()
574  RDOindex index = (*pad_beg).second;
575  index.pad_identifier(id);
576 
577  writeCdo->m_int2id.push_back(id);
578 
579  if (writeCdo->m_int2id.size() != index.hash() + 1) {
580  ATH_MSG_ERROR("Inconsistence between PAD hash and RpcPadIdHash");
582  ATH_MSG_ERROR("Position into RpcPadIdHash map is " << writeCdo->m_int2id.size() - 1);
583  return StatusCode::FAILURE;
584  }
585 
586  unsigned short int side = index.side();
587  unsigned short int rod = index.RODid();
588 
589  if (rod > 15) {
590  ATH_MSG_ERROR("RPC ROD greater than 15");
591  return StatusCode::FAILURE;
592  }
593 
594  IdentifierHash HashID = index.hash();
595 
596  (writeCdo->m_rod2hash[(side == 0x66) ? 0 : 1][rod]).push_back(HashID);
597 
598  writeCdo->m_lookup[id] = index.hash();
599 
600  ATH_MSG_DEBUG("RDO loop entry " << hashID << " done");
601  ++hashID;
602  }
603  ATH_MSG_DEBUG("setup() - start recording RpcCablingCondData");
604 
605  // this must be done both in case of source = COOL or ASCII
606  // ----- Initialization of Pad configuration ------ //
608  if (feedPadThresholds.size() != 3) {
609  // if thresholds vector empty, set it to default
610  feedPadThresholds.assign(3, 0);
611  feedPadThresholds.at(0) = 0;
612  feedPadThresholds.at(1) = 2;
613  feedPadThresholds.at(2) = 5;
614  }
615  ATH_MSG_INFO("Applying FeetPadThresholds : " << feedPadThresholds.at(0) << "," << feedPadThresholds.at(1) << ","
616  << feedPadThresholds.at(2));
617 
618  const unsigned int NumFeetSectors = 8;
619  unsigned int FeetSectors[NumFeetSectors] = {21, 22, 25, 26, 53, 54, 57, 58};
620  const unsigned int NumSpecialFeetPads = 4;
621  unsigned int SpecialFeetPads[NumSpecialFeetPads] = {2, 4, 5, 7};
622 
623  for (unsigned int is = 0; is < NumFeetSectors; is++) {
624  for (unsigned int it = 0; it < NumSpecialFeetPads; it++) {
625  writeCdo->m_RPCPadParameters_array[FeetSectors[is]][SpecialFeetPads[it]].set_feet_on(true);
626  for (unsigned int th = 0; th < 3; th++) {
627  writeCdo->m_RPCPadParameters_array[FeetSectors[is]][SpecialFeetPads[it]].set_feet_threshold(th,
628  feedPadThresholds.at(th));
629  }
630  }
631  }
632  }
633 
634  // reserve enough space
635  writeCdo->m_fullListOfRobIds.reserve(ROBid.size());
636  for (uint32_t robid : ROBid) writeCdo->m_fullListOfRobIds.push_back(robid);
637 
638  ATH_MSG_DEBUG("Number of valid RPC Pad IDs " << writeCdo->m_int2id.size());
639 
640  for (int i = 0; i < 64; i++) writeCdo->m_SectorMap[i] = sectorMap[i];
641  writeCdo->m_SectorType = std::move(sectorType);
642  writeCdo->m_MaxType = maxType;
643 
644  if (msgLvl(MSG::DEBUG)) {
645  std::stringstream ss1;
646  ss1 << "Level-1 configuration database " << std::endl;
647  ss1 << "Contains " << maxType << " Trigger Sector Types:" << std::endl;
648  ss1 << "negative sectors 0 - 15 ==> ";
649  for (int i = 0; i < 16; i++) ss1 << std::setw(2) << sectorMap[i] << " ";
650  ss1 << std::endl << "negative sectors 16 - 31 ==> ";
651  for (int i = 16; i < 32; i++) ss1 << std::setw(2) << sectorMap[i] << " ";
652  ss1 << std::endl << "positive sectors 32 - 47 ==> ";
653  for (int i = 32; i < 48; i++) ss1 << std::setw(2) << sectorMap[i] << " ";
654  ss1 << std::endl << "positive sectors 48 - 63 ==> ";
655  for (int i = 48; i < 64; i++) ss1 << std::setw(2) << sectorMap[i] << " ";
656  ss1 << std::endl;
657  ATH_MSG_DEBUG(ss1.str());
658  }
659 
660  // record
661  if (writeCdo->m_RDOs.empty()) {
662  ATH_MSG_ERROR("Could not read any map configuration");
663  return StatusCode::FAILURE;
664  }
665  if (writeCdo->m_HashVec.empty()) {
666  ATH_MSG_ERROR("Could not read any HashID");
667  return StatusCode::FAILURE;
668  }
669  if (writeCdo->m_SectorType.empty()) {
670  ATH_MSG_ERROR("Could not read any sectorMap");
671  return StatusCode::FAILURE;
672  }
673  if (writeCdo->m_int2id.empty()) {
674  ATH_MSG_ERROR("Could not read any HashID");
675  return StatusCode::FAILURE;
676  }
677  if (writeCdo->m_lookup.empty()) {
678  ATH_MSG_ERROR("Could not read any HashID");
679  return StatusCode::FAILURE;
680  }
681  if (writeCdo->m_fullListOfRobIds.empty()) {
682  ATH_MSG_ERROR("Could not read any HashID");
683  return StatusCode::FAILURE;
684  }
685  ATH_MSG_DEBUG("setup() - RpcCablingCondData recorded");
686  return StatusCode::SUCCESS;
687 }
688 
689 std::list<Identifier> RpcCablingCondAlg::give_strip_id(const unsigned short int SubsystemId, const unsigned short int SectorId,
690  const unsigned short int PADId, const unsigned short int CMAId,
691  const unsigned short ijk, const unsigned short int Channel, const sectorMap_t& smap,
692  const RpcCablingCondData::STvec& sType) const {
693  std::list<unsigned int> CodeList;
694 
695  int logic_sector = SectorId + SubsystemId * 32;
696  unsigned short int Ixx = CMAId & 1;
697  unsigned short int ep = (CMAId >> 1) & 1;
698  unsigned short int lh = (CMAId >> 2) & 1;
699 
700  ep = (ep == 1) ? 0 : 1;
701 
702  // retrieve the Sector Logic setup
703  const RPC_CondCabling::SectorLogicSetup& s = sType[smap[logic_sector] - 1];
704 
705  // retrieve the CMAparameters associated to the identifiers
706  if (ep) {
707  CMAcoverage PhiCov = (logic_sector % 2) ? OddSectors : EvenSectors;
708  CMAidentity PHI(ViewType::Phi, PhiCov, PADId, Ixx);
709  CodeList = s.give_strip_code(PHI, logic_sector, lh, ijk, Channel);
710  } else {
712  CodeList = s.give_strip_code(ETA, logic_sector, lh, ijk, Channel);
713  }
714 
715  std::list<RPCofflineId> offlineIdList;
716  std::list<unsigned int>::const_iterator it = CodeList.begin();
717  while (it != CodeList.end()) {
718  RPCdecoder decode(*it);
719  if (!decode)
720  throw std::runtime_error("RpcCablingCondAlg::give_strip_id() - cannot decode LVL1 Id at " +
721  std::string(__FILE__) + ":" + std::to_string(__LINE__));
722  RPCofflineId rpcId;
723 
724  int RPC_strip = decode.strip_number();
725  int RPC_chamber = decode.rpc_z_index();
726  int RPC_layer = decode.rpc_layer();
727  int RPC_station = decode.lvl1_station();
728  int sector = (decode.logic_sector()) % 32;
729 
730  const RPC_CondCabling::RPCchamber* rpc = s.find_chamber(RPC_station, RPC_chamber);
731 
732  rpcId.stationName = rpc->stationName();
733  rpcId.stationEta = (decode.half_barrel() == Positive) ? rpc->stationEta() : -rpc->stationEta();
734  rpcId.stationPhi = (sector == 31) ? 1 : (sector + 1) / 4 + 1;
735  rpcId.doubletR = rpc->doubletR();
736  rpcId.doubletZ = rpc->doubletZ();
737  rpcId.doubletPhi = (rpc->phiReadoutPannels() == 2) ? (sector + 1) % 2 + 1 : 1;
738  rpcId.gasGap = RPC_layer + 1;
739  rpcId.measuresPhi = static_cast<int>(decode.view());
740  rpcId.strip = RPC_strip + 1;
741 
742  offlineIdList.push_back(std::move(rpcId));
743 
744  ++it;
745  }
746 
747  std::list<Identifier> id;
748  std::list<RPCofflineId>::const_iterator iterator = offlineIdList.begin();
749  while (iterator != offlineIdList.end()) {
750  Identifier rpcId = m_idHelperSvc->rpcIdHelper().channelID((*iterator).stationName, (*iterator).stationEta, (*iterator).stationPhi,
751  (*iterator).doubletR, (*iterator).doubletZ, (*iterator).doubletPhi,
752  (*iterator).gasGap, (*iterator).measuresPhi, (*iterator).strip);
753  id.push_back(rpcId);
754  ++iterator;
755  }
756 
757  return id;
758 }
759 
760 bool RpcCablingCondAlg::correct(const unsigned short int SubsystemId, const unsigned short int SectorId, const unsigned short int PADId,
761  const unsigned short int CMAId, const CMAinput it, const unsigned int layer,
762  const unsigned short int Channel1, const unsigned short int Channel2, const short int number,
763  const L1RPCcabCorrection type, const sectorMap_t& smap, const RpcCablingCondData::STvec& sType) {
764  int logic_sector = (SubsystemId == 0x65) ? SectorId + 32 : SectorId;
765  unsigned short int Ixx = CMAId & 1;
766  unsigned short int ep = (CMAId >> 1) & 1;
767 
768  ep = (ep == 1) ? 0 : 1;
769 
770  // retrieve the Sector Logic setup
771  const RPC_CondCabling::SectorLogicSetup& s = sType[smap[logic_sector] - 1];
772 
773  // retrieve the CMAparameters associated to the identifiers
774  if (ep) {
775  CMAcoverage PhiCov = (logic_sector % 2) ? OddSectors : EvenSectors;
776  CMAidentity PHI(Phi, PhiCov, PADId, Ixx);
777  return s.correct(PHI, type, it, layer, Channel1, Channel2, number);
778  } else {
779  CMAidentity ETA(Eta, AllSectors, PADId, Ixx);
780  return s.correct(ETA, type, it, layer, Channel1, Channel2, number);
781  }
782  return false;
783 }
784 
785 bool RpcCablingCondAlg::BoardParamCheck(const unsigned short int SubId, const unsigned short int SecId, const unsigned short int PADId,
786  const unsigned short int CMAId, const unsigned short int inputType, const unsigned int layer,
787  const unsigned int type, const unsigned short int Channel1, const unsigned short int Channel2,
788  const short int Number) const {
789  if (SubId != 0x65 && SubId != 0x66) {
790  ATH_MSG_ERROR("Subsystem Id out of range: " << SubId << " not in [0x65,0x66].");
791  return false;
792  }
793  if (SecId > 31) {
794  ATH_MSG_ERROR("Sector Id out of range [0/31].");
795  return false;
796  }
797  if (PADId > 8) {
798  ATH_MSG_ERROR("Pad Id out of range [0/8].");
799  return false;
800  }
801  if (CMAId > 7) {
802  ATH_MSG_ERROR("CMA Id out of range [0/7].");
803  return false;
804  }
805  if (inputType > 2) {
806  ATH_MSG_ERROR("Board input out of range [0/2].");
807  return false;
808  }
809  if (layer > 1) {
810  ATH_MSG_ERROR("Board layer out of range [0/1].");
811  return false;
812  }
813  if (type > 3) {
814  ATH_MSG_ERROR("correction type out of range [0/3].");
815  return false;
816  }
817  if (Channel1 > 63) {
818  ATH_MSG_ERROR("ijk Channel 1 out of range [0/31].");
819  return false;
820  }
821  if (Channel2 > 63) {
822  ATH_MSG_ERROR("ijk Channel 2 out of range [0/31].");
823  return false;
824  }
825  if (Number > 64) {
826  ATH_MSG_ERROR("Number out of range [0/64].");
827  return false;
828  }
829  return true;
830 }
831 
832 bool RpcCablingCondAlg::CableParamCheck(const unsigned short int SubId, const unsigned short int SecId, const unsigned short int PADId,
833  const unsigned short int CMAId, const unsigned short int ijk, const unsigned int type,
834  const unsigned short int Channel1, const unsigned short int Channel2,
835  const short int Number) const {
836  if (SubId != 0x65 && SubId != 0x66) {
837  ATH_MSG_ERROR("Subsystem Id out of range [0x65,0x66].");
838  return false;
839  }
840  if (SecId > 31) {
841  ATH_MSG_ERROR("Sector Id out of range [0/31].");
842  return false;
843  }
844  if (PADId > 8) {
845  ATH_MSG_ERROR("Pad Id out of range [0/8].");
846  return false;
847  }
848  if (CMAId > 7) {
849  ATH_MSG_ERROR("CMA Id out of range [0/7].");
850  return false;
851  }
852  if (ijk > 5) {
853  ATH_MSG_ERROR("ijk out of range [0/5].");
854  return false;
855  }
856  if (type > 3) {
857  ATH_MSG_ERROR("correction type out of range [0/3].");
858  return false;
859  }
860  if (Channel1 > 31) {
861  ATH_MSG_ERROR("ijk Channel 1 out of range [0/31].");
862  return false;
863  }
864  if (Channel2 > 31) {
865  ATH_MSG_ERROR("ijk Channel 2 out of range [0/31].");
866  return false;
867  }
868  if (Number > 32) {
869  ATH_MSG_ERROR("Number out of range [0/32].");
870  return false;
871  }
872  return true;
873 }
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
RPCdecoder
Definition: RPCdecoder.h:13
AtlasMcWeight::decode
double decode(number_type binnedWeight)
Convert weight from unsigned to double.
Definition: AtlasMcWeight.cxx:32
RpcCablingCondData::STvec
std::vector< RPC_CondCabling::SectorLogicSetup > STvec
Definition: RpcCablingCondData.h:30
OddSectors
@ OddSectors
Definition: CMAidentity.h:14
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
RpcCablingCondAlg::m_database_repository
Gaudi::Property< std::string > m_database_repository
Definition: RpcCablingCondAlg.h:47
CondAttrListCollection::end
const_iterator end() const
Definition: CondAttrListCollection.h:314
RPC_CondCabling::RPCchamber::doubletZ
int doubletZ() const
Definition: RPCchamber.cxx:37
DiTauMassTools::TauTypes::lh
@ lh
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:53
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
RpcCablingCondAlg::m_ForceFeetPadThresholdsFromJO
Gaudi::Property< bool > m_ForceFeetPadThresholdsFromJO
Definition: RpcCablingCondAlg.h:51
L1RPCcabCorrection
L1RPCcabCorrection
Definition: CMAparameters.h:20
RPC_CondCabling::SectorLogicSetup::giveEtaCMA
const EtaCMAmap & giveEtaCMA() const
Definition: SectorLogicSetup.h:88
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
RPCofflineId::doubletR
int doubletR
Definition: RPCofflineId.h:12
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
ID
std::vector< Identifier > ID
Definition: CalibHitIDCheck.h:24
LArBadChanBlobUtils::Channel
Identifier32::value_type Channel
Definition: LArBadChanBlobUtils.h:24
RPCofflineId
Definition: RPCofflineId.h:8
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
Pivot
@ Pivot
Definition: CMAparameters.h:19
gridSubmitIDTPM.check
check
Definition: gridSubmitIDTPM.py:45
index
Definition: index.py:1
HighPt
@ HighPt
Definition: CMAparameters.h:19
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
PathResolver::find_directory
static std::string find_directory(const std::string &logical_file_name, const std::string &search_path)
Definition: PathResolver.cxx:250
RpcCablingCondAlg::give_strip_id
std::list< Identifier > give_strip_id(const unsigned short int SubsystemId, const unsigned short int SectorId, const unsigned short int PADId, const unsigned short int CMAId, const unsigned short ijk, const unsigned short int Channel, const sectorMap_t &smap, const RpcCablingCondData::STvec &sType) const
Definition: RpcCablingCondAlg.cxx:689
RpcCablingCondAlg::m_writeKey
SG::WriteCondHandleKey< RpcCablingCondData > m_writeKey
Definition: RpcCablingCondAlg.h:44
RPC_CondCabling::CMApivotdata
Definition: CMApivotdata.h:20
RpcCablingCondData::m_RPCPadParameters_array
RPCPadParameters m_RPCPadParameters_array[MAX_LOGICSECTOR][MAX_PADID]
Definition: RpcCablingCondData.h:171
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:13
ReadCellNoiseFromCool.cabling
cabling
Definition: ReadCellNoiseFromCool.py:154
CMAcoverage
CMAcoverage
Definition: CMAidentity.h:14
skel.it
it
Definition: skel.GENtoEVGEN.py:407
RpcCablingCondAlg::execute
virtual StatusCode execute() override
Definition: RpcCablingCondAlg.cxx:25
RDOindex::PADid
unsigned short int PADid(void) const
Definition: RDOindex.h:131
LowPt
@ LowPt
Definition: CMAparameters.h:19
RDOindex::side
unsigned short int side(void) const
Definition: RDOindex.h:127
RpcCablingCondData::m_HashVec
OfflineOnlineHashMap m_HashVec
Definition: RpcCablingCondData.h:136
RpcCablingCondData::m_fullListOfRobIds
std::vector< uint32_t > m_fullListOfRobIds
Definition: RpcCablingCondData.h:157
AthCommonMsg< Algorithm >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
PixelConvert::HashID
int HashID(const std::string &ID)
Definition: PixelConvert.cxx:282
CondAttrListCollection::begin
const_iterator begin() const
Access to Chan/AttributeList pairs via iterators.
Definition: CondAttrListCollection.h:308
IdentifierHash::value_type
unsigned int value_type
Definition: IdentifierHash.h:27
Phi
@ Phi
Definition: RPCdef.h:8
PixelModuleFeMask_create_db.stop
int stop
Definition: PixelModuleFeMask_create_db.py:76
RDOindex::RODid
unsigned short int RODid(void) const
Definition: RDOindex.h:126
RpcCablingCondData::m_RDOs
RDOmap m_RDOs
Definition: RpcCablingCondData.h:134
python.PyKernel.AttributeList
AttributeList
Definition: PyKernel.py:36
RoiUtil::PHI
@ PHI
Definition: RoiSerialise.cxx:31
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
MuonR4::to_string
std::string to_string(const SectorProjector proj)
Definition: MsTrackSeeder.cxx:66
RpcCablingCondData::m_rod2hash
std::vector< IdentifierHash > m_rod2hash[2][16]
Definition: RpcCablingCondData.h:154
CondAttrListCollection
This class is a collection of AttributeLists where each one is associated with a channel number....
Definition: CondAttrListCollection.h:51
CMAdata
Definition: CMAdata.h:19
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
RDOindex::pad_identifier
void pad_identifier(Identifier &id) const
Definition: RDOindex.cxx:69
RpcCablingCondData
Definition: RpcCablingCondData.h:23
RPC_CondCabling::RPCchamberdata
Definition: RPCchamberdata.h:18
RpcCablingCondAlg::SLmap_t
std::map< int, RPC_CondCabling::SectorLogicSetup *, std::less< int > > SLmap_t
Definition: RpcCablingCondAlg.h:31
TRT::Hit::side
@ side
Definition: HitInfo.h:83
RpcCablingCondAlg::sectorMap_t
std::array< int, 64 > sectorMap_t
Definition: RpcCablingCondAlg.h:30
RPC_CondCabling::SectorLogicSetup::find_chamber
const RPCchamber * find_chamber(int, int) const
Definition: SectorLogicSetup.cxx:133
RPC_CondCabling::SectorLogicSetup::SetPtoTrigRoads
void SetPtoTrigRoads(const std::map< std::string, std::string > *)
Definition: SectorLogicSetup.cxx:847
RpcCablingCondData::m_lookup
std::map< Identifier, int > m_lookup
Definition: RpcCablingCondData.h:155
RpcCablingCondData::m_ROB_RDO_map
ROB_RDO_Map m_ROB_RDO_map
Definition: RpcCablingCondData.h:163
python.TriggerHandler.th
th
Definition: TriggerHandler.py:295
jobOptions_CavernBackground.inputType
inputType
Definition: jobOptions_CavernBackground.py:21
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
RpcCablingCondData::m_offline_id
Identifier m_offline_id[2][32][10]
Definition: RpcCablingCondData.h:173
RpcCablingCondData::m_SectorMap
int m_SectorMap[64]
Definition: RpcCablingCondData.h:158
RPCofflineId::stationPhi
int stationPhi
Definition: RPCofflineId.h:11
lumiFormat.i
int i
Definition: lumiFormat.py:85
RPC_CondCabling::RPCchamber::doubletR
int doubletR() const
Definition: RPCchamber.cxx:36
RPC_CondCabling::RPCchamber::stationEta
int stationEta() const
Definition: RPCchamber.cxx:35
RPC_CondCabling::CMAcablingdata
Definition: CMAcablingdata.h:20
EvenSectors
@ EvenSectors
Definition: CMAidentity.h:14
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
DBline::dbhex
const DBfmt & dbhex() const
Definition: dbline.h:369
RpcCablingCondAlg::BoardParamCheck
bool BoardParamCheck(const unsigned short int SubId, const unsigned short int SecId, const unsigned short int PADId, const unsigned short int CMAId, const unsigned short int inputType, const unsigned int layer, const unsigned int type, const unsigned short int Channel1, const unsigned short int Channel2, const short int Number) const
Definition: RpcCablingCondAlg.cxx:785
RpcCablingCondAlg::m_readKey_map_schema_corr
SG::ReadCondHandleKey< CondAttrListCollection > m_readKey_map_schema_corr
Definition: RpcCablingCondAlg.h:37
RPCofflineId::strip
int strip
Definition: RPCofflineId.h:17
RPC_CondCabling::WiredORdata
Definition: WiredORdata.h:17
RpcCablingCondAlg::RpcCablingCondAlg
RpcCablingCondAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: RpcCablingCondAlg.cxx:12
RPCofflineId.h
RpcCablingCondAlg::correct
static bool correct(const unsigned short int SubsystemId, const unsigned short int SectorId, const unsigned short int PADId, const unsigned short int CMAId, const CMAinput it, const unsigned int layer, const unsigned short int Channel1, const unsigned short int Channel2, const short int number, const L1RPCcabCorrection type, const sectorMap_t &smap, const RpcCablingCondData::STvec &sType)
Definition: RpcCablingCondAlg.cxx:760
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
RpcCablingCondAlg::m_readKey_map_schema
SG::ReadCondHandleKey< CondAttrListCollection > m_readKey_map_schema
Definition: RpcCablingCondAlg.h:35
AllSectors
@ AllSectors
Definition: CMAidentity.h:14
RpcCablingCondAlg::m_cosmic_configuration
Gaudi::Property< bool > m_cosmic_configuration
Definition: RpcCablingCondAlg.h:48
RPC_CondCabling::SectorLogicSetup
Definition: SectorLogicSetup.h:23
CondAttrListCollection::attributeList
const AttributeList & attributeList(ChanNum chanNum) const
attribute list for a given channel number
Definition: CondAttrListCollection.h:400
RunTileMonitoring.rod
rod
Definition: RunTileMonitoring.py:134
RpcCablingCondAlg.h
RPCdata
Definition: RPCdata.h:19
AthAlgorithm
Definition: AthAlgorithm.h:47
CMAinput
CMAinput
Definition: CMAparameters.h:19
RPCofflineId::measuresPhi
int measuresPhi
Definition: RPCofflineId.h:16
DBline::dbdec
const DBfmt & dbdec() const
Definition: dbline.h:373
RpcCablingCondData::m_PRD_ROB_map
PRD_ROB_Map m_PRD_ROB_map
Definition: RpcCablingCondData.h:162
RPCofflineId::gasGap
int gasGap
Definition: RPCofflineId.h:15
TileTB.layout
layout
Definition: TileTB.py:76
RPCofflineId::stationEta
int stationEta
Definition: RPCofflineId.h:10
RPCofflineId::stationName
std::string stationName
Definition: RPCofflineId.h:9
RDOindex::set_hash
void set_hash(unsigned int h)
Definition: RDOindex.cxx:49
PathResolver.h
Positive
@ Positive
Definition: RPCdef.h:9
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:239
python.selection.number
number
Definition: selection.py:20
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
RPC_CondCabling::RPCchamber
Definition: RPCchamber.h:23
RpcCablingCondAlg::initialize
virtual StatusCode initialize() override
Definition: RpcCablingCondAlg.cxx:14
RoiUtil::ETA
@ ETA
Definition: RoiSerialise.cxx:30
RPC_CondCabling::RPCchamber::stationName
std::string stationName() const
Definition: RPCchamber.cxx:34
RpcCablingCondAlg::m_readKey_cm_thr_eta
SG::ReadCondHandleKey< CondAttrListCollection > m_readKey_cm_thr_eta
Definition: RpcCablingCondAlg.h:39
RpcCablingCondData::m_MaxType
int m_MaxType
Definition: RpcCablingCondData.h:165
get_generator_info.version
version
Definition: get_generator_info.py:33
RPCofflineId::doubletZ
int doubletZ
Definition: RPCofflineId.h:13
Identifier::getString
std::string getString() const
Provide a string form of the identifier - hexadecimal.
Definition: Identifier.cxx:25
CMAidentity
Definition: CMAidentity.h:16
RpcCablingCondData::m_RDOmap
OfflineOnlineMap m_RDOmap
Definition: RpcCablingCondData.h:135
VKalVrtAthena::varHolder_detail::clear
void clear(T &var)
Definition: NtupleVars.h:48
RPCPadParameters::set_feet_threshold
bool set_feet_threshold(unsigned short int it, unsigned short int th)
Definition: RPCPadParameters.cxx:45
DBline
Definition: dbline.h:255
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
CondAttrListCollection::const_iterator
ChanAttrListMap::const_iterator const_iterator
Definition: CondAttrListCollection.h:62
RpcCablingCondAlg::m_readKey_cm_thr_phi
SG::ReadCondHandleKey< CondAttrListCollection > m_readKey_cm_thr_phi
Definition: RpcCablingCondAlg.h:41
RDOindex::hash
unsigned int hash(void) const
Definition: RDOindex.h:142
RpcCablingCondAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: RpcCablingCondAlg.h:33
DEBUG
#define DEBUG
Definition: page_access.h:11
RpcCablingCondAlg::CableParamCheck
bool CableParamCheck(const unsigned short int SubId, const unsigned short int SecId, const unsigned short int PADId, const unsigned short int CMAId, const unsigned short int ijk, const unsigned int type, const unsigned short int Channel1, const unsigned short int Channel2, const short int Number) const
Definition: RpcCablingCondAlg.cxx:832
AthCommonMsg< Algorithm >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
RPCPadParameters::set_feet_on
void set_feet_on(bool feet_on)
Definition: RPCPadParameters.h:37
python.SystemOfUnits.s
float s
Definition: SystemOfUnits.py:147
RDOindex::ROBid
unsigned short int ROBid(void) const
Definition: RDOindex.h:125
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
RpcCablingCondData::m_SectorType
STvec m_SectorType
Definition: RpcCablingCondData.h:160
RpcCablingCondData::m_int2id
std::vector< Identifier > m_int2id
Definition: RpcCablingCondData.h:153
IdContext
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
Definition: IdContext.h:26
SG::WriteCondHandle
Definition: WriteCondHandle.h:26
RpcCablingCondData::m_PRD_RDO_map
PRD_RDO_Map m_PRD_RDO_map
Definition: RpcCablingCondData.h:161
RpcCablingCondAlg::m_ApplyFeetPadThresholds
Gaudi::Property< bool > m_ApplyFeetPadThresholds
Definition: RpcCablingCondAlg.h:49
RpcCablingCondAlg::setup
StatusCode setup(const CondAttrListCollection *readCdoMap, const CondAttrListCollection *readCdoCorr, const CondAttrListCollection *readCdoEta, const CondAttrListCollection *readCdoPhi, RpcCablingCondData *writeCdo) const
Definition: RpcCablingCondAlg.cxx:92
Eta
@ Eta
Definition: RPCdef.h:8
RDOindex::SLid
unsigned short int SLid(void) const
Definition: RDOindex.h:129
RPC_CondCabling::RPCchamber::phiReadoutPannels
int phiReadoutPannels() const
Definition: RPCchamber.cxx:38
RPCofflineId::doubletPhi
int doubletPhi
Definition: RPCofflineId.h:14
RPC_CondCabling::SectorLogicSetup::EtaCMAmap
std::map< CMAidentity, EtaCMA, std::less< CMAidentity > > EtaCMAmap
Definition: SectorLogicSetup.h:28
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
RDOindex
Definition: RDOindex.h:85
Identifier
Definition: IdentifierFieldParser.cxx:14