ATLAS Offline Software
SCT_ConfigurationCondAlg.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 // Athena include
13 
14 // STL include
15 #include <memory>
16 
17 // Static folder names
18 const std::string SCT_ConfigurationCondAlg::s_coolChannelFolderName{"/SCT/DAQ/Configuration/Chip"};
19 const std::string SCT_ConfigurationCondAlg::s_coolModuleFolderName{"/SCT/DAQ/Configuration/Module"};
20 const std::string SCT_ConfigurationCondAlg::s_coolMurFolderName{"/SCT/DAQ/Configuration/MUR"};
21 
22 // Run2: folders change names
23 const std::string SCT_ConfigurationCondAlg::s_coolChannelFolderName2{"/SCT/DAQ/Config/Chip"};
24 const std::string SCT_ConfigurationCondAlg::s_coolModuleFolderName2{"/SCT/DAQ/Config/Module"};
25 const std::string SCT_ConfigurationCondAlg::s_coolMurFolderName2{"/SCT/DAQ/Config/MUR"};
26 
27 // New slimmed channel folder
28 const std::string SCT_ConfigurationCondAlg::s_coolChannelFolderName2Slim{"/SCT/DAQ/Config/ChipSlim"};
29 
30 SCT_ConfigurationCondAlg::SCT_ConfigurationCondAlg(const std::string& name, ISvcLocator* pSvcLocator)
31  : ::AthReentrantAlgorithm(name, pSvcLocator)
32 {
33 }
34 
36  ATH_MSG_DEBUG("initialize " << name());
37 
38  // SCT cabling tool
39  ATH_CHECK(m_cablingTool.retrieve());
40 
41  ATH_CHECK(detStore()->retrieve(m_pHelper, "SCT_ID"));
42 
43  // Check conditions folder names
47  ATH_MSG_FATAL(m_readKeyChannel.key() << " is incorrect.");
48  return StatusCode::FAILURE;
49  }
51  ATH_MSG_FATAL(m_readKeyModule.key() << " is incorrect.");
52  return StatusCode::FAILURE;
53  }
55  ATH_MSG_FATAL(m_readKeyMur.key() << " is incorrect.");
56  return StatusCode::FAILURE;
57  }
58 
59  // Read Cond Handle
64 
65  // Write Cond Handle
67 
68  ATH_CHECK(m_readoutTool.retrieve());
69 
70  return StatusCode::SUCCESS;
71 }
72 
73 StatusCode SCT_ConfigurationCondAlg::execute(const EventContext& ctx) const {
74  ATH_MSG_DEBUG("execute " << name());
75 
76  // Write Cond Handle
78  // Do we have a valid Write Cond Handle for current time?
79  if (writeHandle.isValid()) {
80  ATH_MSG_DEBUG("CondHandle " << writeHandle.fullKey() << " is already valid."
81  << ". In theory this should not be called, but may happen"
82  << " if multiple concurrent events are being processed out of order.");
83  return StatusCode::SUCCESS;
84  }
85 
86  // Construct the output Cond Object and fill it in
87  std::unique_ptr<SCT_ConfigurationCondData> writeCdo{std::make_unique<SCT_ConfigurationCondData>()};
88  // clear structures before filling
89  writeCdo->clear();
90 
91  // Fill module data
92  if (fillModuleData(writeCdo.get(), writeHandle, ctx).isFailure()) {
93  return StatusCode::FAILURE;
94  }
95 
96  // Fill strip, chip and link info if Chip or MUR folders change
97  if (fillChannelData(writeCdo.get(), writeHandle, ctx).isFailure()) {
98  return StatusCode::FAILURE;
99  }
100 
101  if (writeHandle.record(std::move(writeCdo)).isFailure()) {
102  ATH_MSG_FATAL("Could not record SCT_ConfigurationCondData " << writeHandle.key()
103  << " with EventRange " << writeHandle.getRange()
104  << " into Conditions Store");
105  return StatusCode::FAILURE;
106  }
107  ATH_MSG_INFO("recorded new CDO " << writeHandle.key() << " with range " << writeHandle.getRange() << " into Conditions Store");
108 
109  return StatusCode::SUCCESS;
110 }
111 
112 // Fill bad strip, chip and link info
114  // Check if the pointer of derived conditions object is valid.
115  if (writeCdo==nullptr) {
116  ATH_MSG_FATAL("Pointer of derived conditions object is null");
117  return StatusCode::FAILURE;
118  }
119 
120  unsigned int nDisabledChips{0};
121  unsigned int nDisabledChipsExclusive{0};
122  unsigned int nDisabledStripsExclusive{0};
123  const std::string channelFolderName{m_readKeyChannel.key()};
124  const bool run1{channelFolderName==s_coolChannelFolderName};
125  const bool slim{channelFolderName==s_coolChannelFolderName2Slim};
126 
127  // indices change according to whether CoraCool or CoolVectorPayload
128  enum RUN1_MODULE_INDICES{PK, FOREIGN_KEY, CRATE_1, ROD_1, CHANNEL_1,OUTPUTCURRENT_1,
129  OUTPUTDELAY_1, OUTPUT_TOF_DELTA_1, OUTPUTMARKSPACE_1, STREAM0THRESHOLD_1,
130  STREAM0DELAY_1, STREAM0ERRMASK_1, STREAM1THRESHOLD_1, STREAM1DELAY_1, STREAM1ERRMASK_1};
131  enum RUN2_MODULE_INDICES{CRATE_2, ROD_2, CHANNEL_2,OUTPUTCURRENT_2,
132  OUTPUTDELAY_2, OUTPUTMARKSPACE_2, STREAM0THRESHOLD_2,
133  STREAM0DELAY_2, STREAM0ERRMASK_2, STREAM1THRESHOLD_2, STREAM1DELAY_2, STREAM1ERRMASK_2};
134  enum RUN1_CHIP_INDICES{CHIP_PK, CHIP_FOREIGN_KEY,CHIP_1, ACTIVE_1,ADDRESS_1, CONFIG_1,
135  MASK0_1,MASK1_1,MASK2_1,MASK3_1, VTHR_1, VCAL_1, DELAY_1, PREAMP_1, SHAPER_1,
136  RC_FUNCTION_1, RC_ARGS_1, C_FACTOR_1, TARGET_1, TRIM_1};
137  enum RUN2_CHIP_INDICES{CHIP_2, ACTIVE_2, ADDRESS_2, CONFIG_2, MASK0_2,MASK1_2,MASK2_2,
138  MASK3_2, VTHR_2, VCAL_2, DELAY_2, PREAMP_2, SHAPER_2, RC_FUNCTION_2, RC_ARGS_2,
139  C_FACTOR_2, TARGET_2, TRIM_2};
140  enum RUN2_CHIPSLIM_INDICES{CHIP_2_SLIM, CONFIG_2_SLIM, MASK0_2_SLIM, MASK1_2_SLIM, MASK2_2_SLIM,
141  MASK3_2_SLIM};
142  const unsigned int chipIndex{ run1 ? static_cast<unsigned int>(CHIP_1) : slim ? static_cast<unsigned int>(CHIP_2_SLIM) : static_cast<unsigned int>(CHIP_2)};
143  const unsigned int configIndex{run1 ? static_cast<unsigned int>(CONFIG_1) : slim ? static_cast<unsigned int>(CONFIG_2_SLIM) : static_cast<unsigned int>(CONFIG_2)};
144  const unsigned int mask0Index{ run1 ? static_cast<unsigned int>(MASK0_1) : slim ? static_cast<unsigned int>(MASK0_2_SLIM) : static_cast<unsigned int>(MASK0_2)};
145  const unsigned int mask1Index{ run1 ? static_cast<unsigned int>(MASK1_1) : slim ? static_cast<unsigned int>(MASK1_2_SLIM) : static_cast<unsigned int>(MASK1_2)};
146  const unsigned int mask2Index{ run1 ? static_cast<unsigned int>(MASK2_1) : slim ? static_cast<unsigned int>(MASK2_2_SLIM) : static_cast<unsigned int>(MASK2_2)};
147  const unsigned int mask3Index{ run1 ? static_cast<unsigned int>(MASK3_1) : slim ? static_cast<unsigned int>(MASK3_2_SLIM) : static_cast<unsigned int>(MASK3_2)};
148 
149  // Clear previous information at callback
150  writeCdo->clearBadStripIds();
151  writeCdo->clearBadChips();
152  // Fill link status
153  if (fillLinkStatus(writeCdo, writeHandle, ctx).isFailure()) return StatusCode::FAILURE;
154 
155  // Get channel folder for link info
157  const CondAttrListVec* readCdo{*readHandle};
158  if (readCdo==nullptr) {
159  ATH_MSG_FATAL("Could not find MUR configuration data: " << m_readKeyChannel.key());
160  return StatusCode::FAILURE;
161  }
162  ATH_MSG_INFO("Size of " << m_readKeyChannel.key() << " folder is " << readCdo->size());
163  // Add dependency
164  writeHandle.addDependency(readHandle);
165 
166  // Get SCT_DetectorElementCollection
168  const InDetDD::SiDetectorElementCollection* elements(sctDetEle.retrieve());
169  if (elements==nullptr) {
170  ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " could not be retrieved");
171  return StatusCode::FAILURE;
172  }
173  // Add dependency
174  writeHandle.addDependency(sctDetEle);
175 
176  // Loop over modules (i.e groups of 12 chips) in DB folder
177  CondAttrListVec::const_iterator itr{readCdo->begin()};
178  CondAttrListVec::const_iterator end{readCdo->end()};
179  constexpr unsigned int nChips{12};
180  for (; itr!=end; itr+=nChips) {
181  // Get SN and identifiers (the channel number is serial number+1 for the CoraCool folders but =serial number
182  // for Cool Vector Payload ; i.e. Run 1 and Run 2 resp.)
183  const unsigned int truncatedSerialNumber{run1 ? (itr->first-1) : (itr->first)};
184  const IdentifierHash& hash{m_cablingTool->getHashFromSerialNumber(truncatedSerialNumber, ctx)};
185  if (not hash.is_valid()) continue;
186  const Identifier waferId{m_pHelper->wafer_id(hash)};
187  const Identifier moduleId{m_pHelper->module_id(waferId)};
188 
189  IdentifierHash oppWaferHash;
190  m_pHelper->get_other_side(hash, oppWaferHash);
191  const Identifier oppWaferId{m_pHelper->wafer_id(oppWaferHash)};
192  bool isBadModule{writeCdo->isBadModuleId(moduleId)};
193 
194  // Get link status
195  // Can maybe be smarter if both links are bad (but the module will probably be bad then)
196  std::pair<bool, bool> linkResults{writeCdo->areBadLinks(hash)};
197  bool link0ok{linkResults.first};
198  bool link1ok{linkResults.second};
199  // Loop over chips within module
200  std::vector<SCT_Chip> chipsInMod;
201  chipsInMod.reserve(nChips);
202  bool isBadSide0{true};
203  bool isBadSide1{true};
204  CondAttrListVec::const_iterator channelItr{itr};
205  CondAttrListVec::const_iterator channelEnd{itr+nChips};
206  for (; channelItr!=channelEnd; ++channelItr) {
207  // Get chip id, config and masks and store as SCT_Chip object
208  // Can get AttributeList from second (see https://svnweb.cern.ch/trac/lcgcoral/browser/coral/trunk/src/CoralBase/CoralBase/AttributeList.h )
209  const short id{ run1 ? (channelItr->second[chipIndex].data<short>()) : static_cast<short>(channelItr->second[chipIndex].data<unsigned char>())};
210  const short config{run1 ? (channelItr->second[configIndex].data<short>()) : static_cast<short>(channelItr->second[configIndex].data<unsigned short>())};
211  const int mask0{ run1 ? (channelItr->second[mask0Index].data<int>()) : static_cast<int>(channelItr->second[mask0Index].data<unsigned int>())};
212  const int mask1{ run1 ? (channelItr->second[mask1Index].data<int>()) : static_cast<int>(channelItr->second[mask1Index].data<unsigned int>())};
213  const int mask2{ run1 ? (channelItr->second[mask2Index].data<int>()) : static_cast<int>(channelItr->second[mask2Index].data<unsigned int>())};
214  const int mask3{ run1 ? (channelItr->second[mask3Index].data<int>()) : static_cast<int>(channelItr->second[mask3Index].data<unsigned int>())};
215  chipsInMod.emplace_back(id, config, mask0, mask1, mask2, mask3);
216  if (id>=0 and id< 6 and (mask0!=0 or mask1!=0 or mask2!=0 or mask3!=0)) isBadSide0 = false;
217  if (id>=6 and id<12 and (mask0!=0 or mask1!=0 or mask2!=0 or mask3!=0)) isBadSide1 = false;
218  }
219  if (isBadSide0) writeCdo->setBadWaferId(waferId);
220  if (isBadSide1) writeCdo->setBadWaferId(oppWaferId);
221 
222  // Check the module readout to look for bypassed chips, disabled links etc
223  if (m_readoutTool->determineReadout(moduleId, chipsInMod, link0ok, link1ok).isFailure()) return StatusCode::FAILURE;
224 
225  // Loop over chips again now know whether they're in the readout
226  std::vector<int> badStripsVec;
227  unsigned int chipStatusWord{0};
228  for (const auto& thisChip:chipsInMod) {
229  // Bad strips (only need to do this if at least one bad channel)
230  if (thisChip.numberOfMaskedChannels()!=0) {
231  // Add bad stips to vector
232  badStripsVec.clear();
233  thisChip.appendBadStripsToVector(badStripsVec);
234  // Loop over bad strips and insert strip ID into set
235  for (const auto& thisBadStrip:badStripsVec) {
236  const Identifier stripId{getStripId(truncatedSerialNumber, thisChip.id(), thisBadStrip, elements, ctx)};
237  // If in rough order, may be better to call with itr of previous insertion as a suggestion
238  if (stripId.is_valid()) writeCdo->setBadStripId(stripId, // strip Identifier
239  thisChip.id()<6 ? hash : oppWaferHash, // wafer IdentifierHash
240  m_pHelper->strip(stripId)); // strip number from 0 to 768
241  }
242  }
243  // Bad chips (= all strips bad) bitpacked
244  // Should only do this for modules with at least one chip bad?
245  if (thisChip.numberOfMaskedChannels()==stripsPerChip) {
246  chipStatusWord |= (1<<thisChip.id());
247  nDisabledChips++; // A bad chip
248  if (not isBadModule) nDisabledChipsExclusive++; // A bad chip in a good module
249  } else { // Good chip
250  if (not isBadModule) nDisabledStripsExclusive += thisChip.numberOfMaskedChannels(); // Bad strips in a good chip of a good module
251  }
252  }
253 
254  // Store chip status if not all good (==0)
255  if (chipStatusWord!=0) {
256  writeCdo->setBadChips(moduleId, chipStatusWord);
257  }
258  }
259 
260  const long unsigned int totalBad{writeCdo->getBadStripIds()->size()};
261  ATH_MSG_INFO("Total number of bad chips is " << nDisabledChips);
262  ATH_MSG_INFO("Total number of bad chips not in bad modules is " << nDisabledChipsExclusive);
263  ATH_MSG_INFO("Total number of bad strip identifiers is " << totalBad);
264  ATH_MSG_INFO("Total number of bad strip identifiers not in bad modules nor bad chips is " << nDisabledStripsExclusive);
265 
266  return StatusCode::SUCCESS;
267 }
268 
269 // Fill bad module info
271  // Check if the pointer of derived conditions object is valid.
272  if (writeCdo==nullptr) {
273  ATH_MSG_FATAL("Pointer of derived conditions object is null");
274  return StatusCode::FAILURE;
275  }
276 
277  const std::string moduleFolderName{m_readKeyModule.key()};
278  const bool run1{moduleFolderName==s_coolModuleFolderName};
279  unsigned int totalNumberOfModules{0};
280  unsigned int totalNumberOfValidModules{0};
281 
282  // Clear previous information at callback
283  writeCdo->clearBadModuleIds();
284  writeCdo->clearBadWaferIds();
285 
286  // Get Module folder
288  const CondAttrListVec* readCdo{*readHandle};
289  if (readCdo==nullptr) {
290  ATH_MSG_FATAL("Could not find MUR configuration data: " << m_readKeyModule.key());
291  return StatusCode::FAILURE;
292  }
293  ATH_MSG_INFO("Size of " << m_readKeyModule.key() << " is " << readCdo->size());
294 
295  // Add dependency
296  writeHandle.addDependency(readHandle);
297 
298  // Set index
299  enum RUN1_INDICES{PK, FOREIGN_KEY, ID_1, GROUP_1, ACTIVE_1, SELECT_1};
300  enum RUN2_INDICES{ID_2, SLAVEGROUP_2, ACTIVE_2, CLOCKSELECT_2, CHIPSTATUS_2};
301  const unsigned int groupIndex{run1 ? static_cast<unsigned int>(GROUP_1) : static_cast<unsigned int>(SLAVEGROUP_2)};
302 
303  // Loop over modules in DB folder
304  CondAttrListVec::const_iterator itr{readCdo->begin()};
305  CondAttrListVec::const_iterator end{readCdo->end()};
306  for (; itr!=end; ++itr) {
307  // Get SN and identifiers (the channel number is serial number+1 for the CoraCool folders but =serial number
308  // for Cool Vector Payload ; i.e. Run 1 and Run 2 resp.)
309  const unsigned int truncatedSerialNumber{run1 ? (itr->first-1) : (itr->first)};
310  const IdentifierHash& hash{m_cablingTool->getHashFromSerialNumber(truncatedSerialNumber, ctx)};
311  ++totalNumberOfModules;
312  if (not hash.is_valid()) continue;
313 
314  Identifier waferId{m_pHelper->wafer_id(hash)};
315  ++totalNumberOfValidModules;
316  IdentifierHash oppWaferHash;
317  m_pHelper->get_other_side(m_cablingTool->getHashFromSerialNumber(truncatedSerialNumber, ctx), oppWaferHash);
318  const Identifier oppWaferId{m_pHelper->wafer_id(oppWaferHash)};
319  const Identifier moduleId{m_pHelper->module_id(waferId)};
320  // Get AttributeList from second (see https://svnweb.cern.ch/trac/lcgcoral/browser/coral/trunk/src/CoralBase/CoralBase/AttributeList.h )
321  // and get module info from this. Bad module has a -ve group.
322  const short group{itr->second[groupIndex].data<short>()};
323  if (group<0) {
324  // Insert module/wafer ID into set of bad modules/wafers IDs
325  writeCdo->setBadModuleId(moduleId);
326  writeCdo->setBadWaferId(waferId);
327  writeCdo->setBadWaferId(oppWaferId);
328  }
329  }
330 
331  const long unsigned int totalBad{writeCdo->getBadModuleIds()->size()};
332  ATH_MSG_INFO("Total number of module identifiers is " << totalNumberOfModules);
333  ATH_MSG_INFO("Total number of modules also found in the cabling is " << totalNumberOfValidModules);
334  ATH_MSG_INFO("Total number of bad module identifiers is " << totalBad);
335 
336  return StatusCode::SUCCESS;
337 }
338 
339 // Fill link info
341  // Check if the pointer of derived conditions object is valid.
342  if (writeCdo==nullptr) {
343  ATH_MSG_FATAL("Pointer of derived conditions object is null");
344  return StatusCode::FAILURE;
345  }
346 
347  const std::string murFolderName{m_readKeyMur.key()};
348  const bool run1{murFolderName==s_coolMurFolderName};
349 
350  // Clear previous information at call back
351  writeCdo->clearBadLinks();
352 
353  // Get MUR folder for link info
355  const CondAttrListVec* readCdo{*readHandle};
356  if (readCdo==nullptr) {
357  ATH_MSG_FATAL("Could not find MUR configuration data: " << m_readKeyMur.key());
358  return StatusCode::FAILURE;
359  }
360  ATH_MSG_INFO("Size of " << m_readKeyMur.key() << " is " << readCdo->size());
361 
362  // Add dependency
363  writeHandle.addDependency(readHandle);
364 
365  // Set indices
366  enum RUN1_INDICES{PK, FOREIGN_KEY, MUR_1, MODULE_1, MODULEID_1, RMODULEID_1, RX0FIBRE_1, RX1FIBRE_1, TXFIBRE_1};
367  enum RUN2_INDICES{MUR_2, MODULE_2, MODULEID_2, RMODULEID_2, RX0FIBRE_2, RX1FIBRE_2, TXFIBRE_2};
368  const unsigned int snIndex{ run1 ? static_cast<unsigned int>(MODULEID_1) : static_cast<unsigned int>(MODULEID_2)};
369  const unsigned int link0Index{run1 ? static_cast<unsigned int>(RX0FIBRE_1) : static_cast<unsigned int>(RX0FIBRE_2)};
370  const unsigned int link1Index{run1 ? static_cast<unsigned int>(RX1FIBRE_1) : static_cast<unsigned int>(RX1FIBRE_2)};
371 
372  // loop over MUR folder
373  CondAttrListVec::const_iterator itr{readCdo->begin()};
374  CondAttrListVec::const_iterator end{readCdo->end()};
375  for (; itr!=end; ++itr) {
376  // Check for null values
377  if (itr->second[snIndex].isNull()) continue;
378  // Check serial number
379  const long long ullSerialNumber{itr->second[snIndex].data<long long>()};
380  const SCT_SerialNumber serialNumber{ullSerialNumber};
381  if (not serialNumber.is_valid()) continue;
382  // Check module hash
383  const IdentifierHash& hash{m_cablingTool->getHashFromSerialNumber(serialNumber.to_uint(), ctx)};
384  if (not hash.is_valid()) continue;
385 
386  int link0{run1 ? (itr->second[link0Index].data<int>()) : static_cast<int>(itr->second[link0Index].data<unsigned char>())};
387  int link1{run1 ? (itr->second[link1Index].data<int>()) : static_cast<int>(itr->second[link1Index].data<unsigned char>())};
388 
389  // Store the modules with bad links, represented by badLink (enum in header) = 255 = 0xFF
390  if (link0==badLink or link1==badLink) {
391  writeCdo->setBadLinks(hash, (link0!=badLink), (link1!=badLink));
392  }
393  }
394 
395  return StatusCode::SUCCESS;
396 }
397 
398 // Construct the strip ID from the module SN, chip number and strip number
399 Identifier
400 SCT_ConfigurationCondAlg::getStripId(const unsigned int truncatedSerialNumber, const unsigned int chipNumber, const unsigned int stripNumber,
401  const InDetDD::SiDetectorElementCollection* elements, const EventContext& ctx) const {
402  Identifier waferId;
403  const Identifier invalidIdentifier; //initialiser creates invalid Id
404  unsigned int strip{0};
405  IdentifierHash waferHash;
406  if (not m_cablingTool) {
407  ATH_MSG_FATAL("The cabling tool pointer is zero.");
408  return invalidIdentifier;
409  }
410  // If the chip is 0-5 we are in side 0, otherwise in side 1. 'getHash' only
411  // returns the side 0 hash, so we use the helper for side 1
412 
413  if (chipNumber<6) {
414  waferHash = m_cablingTool->getHashFromSerialNumber(truncatedSerialNumber, ctx);
415  strip = chipNumber * stripsPerChip + stripNumber;
416  if (waferHash.is_valid()) waferId = m_pHelper->wafer_id(waferHash);
417  } else {
418  m_pHelper->get_other_side(m_cablingTool->getHashFromSerialNumber(truncatedSerialNumber, ctx), waferHash);
419  strip = (chipNumber - 6) * stripsPerChip + stripNumber;
420  if (waferHash.is_valid()) waferId = m_pHelper->wafer_id(waferHash);
421  }
422 
423  if (not waferId.is_valid()) return invalidIdentifier;
424 
425  const InDetDD::SiDetectorElement* pElement{elements->getDetectorElement(waferHash)};
426  if (pElement==nullptr) {
427  ATH_MSG_FATAL("Element pointer is nullptr in 'getStripId' method");
428  return invalidIdentifier;
429  }
430  strip = (pElement->swapPhiReadoutDirection()) ? (lastStrip-strip) : strip;
431  return m_pHelper->strip_id(waferId, strip);
432 }
433 
435  ATH_MSG_DEBUG("finalize " << name());
436  return StatusCode::SUCCESS;
437 }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
SCT_ConfigurationCondAlg::m_pHelper
const SCT_ID * m_pHelper
ID helper for SCT.
Definition: SCT_ConfigurationCondAlg.h:66
SCT_ConfigurationCondAlg::m_readKeyMur
SG::ReadCondHandleKey< CondAttrListVec > m_readKeyMur
Definition: SCT_ConfigurationCondAlg.h:60
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
SCT_ID.h
This is an Identifier helper class for the SCT subdetector. This class is a factory for creating comp...
SCT_ConfigurationCondAlg::s_coolMurFolderName
static const std::string s_coolMurFolderName
Definition: SCT_ConfigurationCondAlg.h:55
SCT_ConfigurationCondData::setBadWaferId
void setBadWaferId(const Identifier &badWaferId)
Set a bad wafer identifier.
Definition: SCT_ConfigurationCondData.cxx:54
SiliconTech::strip
@ strip
SCT_ConfigurationCondAlg::stripsPerChip
@ stripsPerChip
Definition: SCT_ConfigurationCondAlg.h:42
InDetDD::SiDetectorElementCollection
Definition: SiDetectorElementCollection.h:30
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
SCT_ConfigurationCondAlg::s_coolChannelFolderName
static const std::string s_coolChannelFolderName
Definition: SCT_ConfigurationCondAlg.h:50
SCT_ConfigurationCondAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override final
Definition: SCT_ConfigurationCondAlg.cxx:73
SCT_ConfigurationCondAlg::fillModuleData
StatusCode fillModuleData(SCT_ConfigurationCondData *writeCdo, SG::WriteCondHandle< SCT_ConfigurationCondData > &writeHandle, const EventContext &ctx) const
Definition: SCT_ConfigurationCondAlg.cxx:270
SCT_ConfigurationCondData::setBadLinks
void setBadLinks(const IdentifierHash &hash, const bool isBadLink0, const bool isBadLink1)
Set bad links for a module.
Definition: SCT_ConfigurationCondData.cxx:102
SCT_ConfigurationCondData::getBadStripIds
const std::set< Identifier > * getBadStripIds() const
Get all bad strip identifiers.
Definition: SCT_ConfigurationCondData.cxx:35
SCT_ConfigurationCondData::clearBadLinks
void clearBadLinks()
Clear all bad links.
Definition: SCT_ConfigurationCondData.cxx:123
SCT_ConfigurationCondAlg::m_readKeyChannel
SG::ReadCondHandleKey< CondAttrListVec > m_readKeyChannel
Definition: SCT_ConfigurationCondAlg.h:58
SCT_ConfigurationCondData::clearBadModuleIds
void clearBadModuleIds()
Clear all bad module identifiers.
Definition: SCT_ConfigurationCondData.cxx:90
SCT_ConfigurationCondAlg::s_coolModuleFolderName
static const std::string s_coolModuleFolderName
Definition: SCT_ConfigurationCondAlg.h:53
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
Identifier::is_valid
bool is_valid() const
Check if id is in a valid state.
SCT_ID::module_id
Identifier module_id(int barrel_ec, int layer_disk, int phi_module, int eta_module) const
For a single crystal.
Definition: SCT_ID.h:416
config
Definition: PhysicsAnalysis/AnalysisCommon/AssociationUtils/python/config.py:1
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
SCT_ConfigurationCondData::isBadModuleId
bool isBadModuleId(const Identifier &moduleId) const
Check if a module identifier is bad one.
Definition: SCT_ConfigurationCondData.cxx:96
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
SCT_Chip.h
SCT_ConfigurationCondAlg::initialize
virtual StatusCode initialize() override final
Definition: SCT_ConfigurationCondAlg.cxx:35
SCT_ConfigurationCondAlg::fillChannelData
StatusCode fillChannelData(SCT_ConfigurationCondData *writeCdo, SG::WriteCondHandle< SCT_ConfigurationCondData > &writeHandle, const EventContext &ctx) const
Definition: SCT_ConfigurationCondAlg.cxx:113
SCT_ConfigurationCondAlg::badLink
@ badLink
Definition: SCT_ConfigurationCondAlg.h:42
SCT_ConfigurationCondAlg::m_writeKey
SG::WriteCondHandleKey< SCT_ConfigurationCondData > m_writeKey
Definition: SCT_ConfigurationCondAlg.h:62
SCT_ConfigurationCondAlg::m_SCTDetEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_SCTDetEleCollKey
Definition: SCT_ConfigurationCondAlg.h:61
CondAttrListVec
Definition: CondAttrListVec.h:31
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
maskDeadModules.run1
run1
Definition: maskDeadModules.py:40
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
SCT_ConfigurationCondData::setBadStripId
void setBadStripId(const Identifier &badStripId, const IdentifierHash &hash, const int strip)
Set a bad strip identifier.
Definition: SCT_ConfigurationCondData.cxx:28
SCT_ConfigurationCondAlg::m_cablingTool
ToolHandle< ISCT_CablingTool > m_cablingTool
Handle on SCT cabling service.
Definition: SCT_ConfigurationCondAlg.h:64
SCT_ConfigurationCondAlg::getStripId
Identifier getStripId(const unsigned int truncatedSerialNumber, const unsigned int chipNumber, const unsigned int stripNumber, const InDetDD::SiDetectorElementCollection *elements, const EventContext &ctx) const
Definition: SCT_ConfigurationCondAlg.cxx:400
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
SCT_ConfigurationCondAlg::SCT_ConfigurationCondAlg
SCT_ConfigurationCondAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: SCT_ConfigurationCondAlg.cxx:30
SCT_ConfigurationCondData
Class for data object used in SCT_ConfigurationCondAlg and SCT_ConfigurationConditionsTool.
Definition: SCT_ConfigurationCondData.h:30
SCT_ID::get_other_side
int get_other_side(const IdentifierHash &id, IdentifierHash &other) const
Wafer hash on other side.
Definition: SCT_ID.cxx:435
SCT_ConfigurationCondAlg::lastStrip
@ lastStrip
Definition: SCT_ConfigurationCondAlg.h:42
IdentifierHash::is_valid
bool is_valid() const
Check if id is in a valid state.
SCT_ConfigurationCondAlg::s_coolChannelFolderName2
static const std::string s_coolChannelFolderName2
Definition: SCT_ConfigurationCondAlg.h:51
SCT_ConfigurationCondData::clearBadWaferIds
void clearBadWaferIds()
Clear all bad wafer identifiers.
Definition: SCT_ConfigurationCondData.cxx:66
SCT_ConfigurationCondData::clearBadStripIds
void clearBadStripIds()
Clear all bad strip identifiers.
Definition: SCT_ConfigurationCondData.cxx:41
CondAttrListVec::const_iterator
AttrListVec::const_iterator const_iterator
Definition: CondAttrListVec.h:36
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
IdentifierHash.h
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
SCT_ConfigurationCondAlg::m_readoutTool
ToolHandle< ISCT_ReadoutTool > m_readoutTool
Handle on readout tool.
Definition: SCT_ConfigurationCondAlg.h:65
SCT_ConfigurationCondAlg::s_coolMurFolderName2
static const std::string s_coolMurFolderName2
Definition: SCT_ConfigurationCondAlg.h:56
SiDetectorElement.h
SCT_SerialNumber
Definition: SCT_SerialNumber.h:22
SCT_ConfigurationCondAlg::finalize
virtual StatusCode finalize() override final
Definition: SCT_ConfigurationCondAlg.cxx:434
SCT_ConfigurationCondData::areBadLinks
std::pair< bool, bool > areBadLinks(const IdentifierHash &hash) const
Check if a module has bad links.
Definition: SCT_ConfigurationCondData.cxx:130
SCT_ConfigurationCondAlg::s_coolChannelFolderName2Slim
static const std::string s_coolChannelFolderName2Slim
Definition: SCT_ConfigurationCondAlg.h:52
SCT_ConfigurationCondAlg::s_coolModuleFolderName2
static const std::string s_coolModuleFolderName2
Definition: SCT_ConfigurationCondAlg.h:54
SCT_ConfigurationCondAlg.h
CaloLCW_tf.group
group
Definition: CaloLCW_tf.py:28
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:109
SCT_ID::strip
int strip(const Identifier &id) const
Definition: SCT_ID.h:764
SCT_ConfigurationCondData::clearBadChips
void clearBadChips()
Clear all bad chips.
Definition: SCT_ConfigurationCondData.cxx:156
SCT_SerialNumber.h
SCT_ConfigurationCondAlg::fillLinkStatus
StatusCode fillLinkStatus(SCT_ConfigurationCondData *writeCdo, SG::WriteCondHandle< SCT_ConfigurationCondData > &writeHandle, const EventContext &ctx) const
Definition: SCT_ConfigurationCondAlg.cxx:340
SCT_ConfigurationCondData::setBadModuleId
void setBadModuleId(const Identifier &badModuleId)
Set a bad module identifier.
Definition: SCT_ConfigurationCondData.cxx:78
SCT_ConfigurationCondAlg::m_readKeyModule
SG::ReadCondHandleKey< CondAttrListVec > m_readKeyModule
Definition: SCT_ConfigurationCondAlg.h:59
SCT_ConfigurationCondData::setBadChips
void setBadChips(const Identifier &moduleId, const unsigned int chipStatus)
Set bad chips for a module.
Definition: SCT_ConfigurationCondData.cxx:137
SCT_ConfigurationCondData::getBadModuleIds
const std::set< Identifier > * getBadModuleIds() const
Get all bad module identifiers.
Definition: SCT_ConfigurationCondData.cxx:84
SCT_ID::wafer_id
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side) const
For a single side of module.
Definition: SCT_ID.h:464
IdentifierHash
Definition: IdentifierHash.h:38
SG::WriteCondHandle
Definition: WriteCondHandle.h:26
InDetDD::SiDetectorElementCollection::getDetectorElement
const SiDetectorElement * getDetectorElement(const IdentifierHash &hash) const
Definition: SiDetectorElementCollection.cxx:15
SG::WriteCondHandle::addDependency
void addDependency(const EventIDRange &range)
Definition: WriteCondHandle.h:275
SCT_ID::strip_id
Identifier strip_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side, int strip) const
For an individual strip.
Definition: SCT_ID.h:535