ATLAS Offline Software
Loading...
Searching...
No Matches
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
18const std::string SCT_ConfigurationCondAlg::s_coolChannelFolderName{"/SCT/DAQ/Configuration/Chip"};
19const std::string SCT_ConfigurationCondAlg::s_coolModuleFolderName{"/SCT/DAQ/Configuration/Module"};
20const std::string SCT_ConfigurationCondAlg::s_coolMurFolderName{"/SCT/DAQ/Configuration/MUR"};
21
22// Run2: folders change names
23const std::string SCT_ConfigurationCondAlg::s_coolChannelFolderName2{"/SCT/DAQ/Config/Chip"};
24const std::string SCT_ConfigurationCondAlg::s_coolModuleFolderName2{"/SCT/DAQ/Config/Module"};
25const std::string SCT_ConfigurationCondAlg::s_coolMurFolderName2{"/SCT/DAQ/Config/MUR"};
26
27// New slimmed channel folder
28const std::string SCT_ConfigurationCondAlg::s_coolChannelFolderName2Slim{"/SCT/DAQ/Config/ChipSlim"};
29
30SCT_ConfigurationCondAlg::SCT_ConfigurationCondAlg(const std::string& name, ISvcLocator* pSvcLocator)
31 : ::AthCondAlgorithm(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
60 ATH_CHECK(m_readKeyChannel.initialize());
61 ATH_CHECK(m_readKeyModule.initialize());
62 ATH_CHECK(m_readKeyMur.initialize());
63 ATH_CHECK(m_SCTDetEleCollKey.initialize());
64
65 // Write Cond Handle
66 ATH_CHECK(m_writeKey.initialize());
67
68 ATH_CHECK(m_readoutTool.retrieve());
69
70 return StatusCode::SUCCESS;
71}
72
73StatusCode 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
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
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
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
400SCT_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}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_FATAL(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_DEBUG(x)
static const uint32_t mask3
static const std::string murFolderName
Header file storing infomration on the SCT chips: id, config, mask.
This is an Identifier helper class for the SCT subdetector.
Header file for a utility class to hold the serial number.
const ServiceHandle< StoreGateSvc > & detStore() const
Base class for conditions algorithms.
AttrListVec::const_iterator const_iterator
const_iterator end() const
const_iterator begin() const
size_type size() const
This is a "hash" representation of an Identifier.
bool is_valid() const
Check if id is in a valid state.
bool is_valid() const
Check if id is in a valid state.
Class to hold the SiDetectorElement objects to be put in the detector store.
const SiDetectorElement * getDetectorElement(const IdentifierHash &hash) const
Class to hold geometrical description of a silicon detector element.
bool swapPhiReadoutDirection() const
Determine if readout direction between online and offline needs swapping.
virtual StatusCode execute(const EventContext &ctx) const override final
virtual StatusCode finalize() override final
static const std::string s_coolChannelFolderName
virtual StatusCode initialize() override final
StatusCode fillChannelData(SCT_ConfigurationCondData *writeCdo, SG::WriteCondHandle< SCT_ConfigurationCondData > &writeHandle, const EventContext &ctx) const
SG::WriteCondHandleKey< SCT_ConfigurationCondData > m_writeKey
SCT_ConfigurationCondAlg(const std::string &name, ISvcLocator *pSvcLocator)
Identifier getStripId(const unsigned int truncatedSerialNumber, const unsigned int chipNumber, const unsigned int stripNumber, const InDetDD::SiDetectorElementCollection *elements, const EventContext &ctx) const
static const std::string s_coolMurFolderName
static const std::string s_coolModuleFolderName
ToolHandle< ISCT_ReadoutTool > m_readoutTool
Handle on readout tool.
ToolHandle< ISCT_CablingTool > m_cablingTool
Handle on SCT cabling service.
const SCT_ID * m_pHelper
ID helper for SCT.
static const std::string s_coolModuleFolderName2
static const std::string s_coolMurFolderName2
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_SCTDetEleCollKey
static const std::string s_coolChannelFolderName2
SG::ReadCondHandleKey< CondAttrListVec > m_readKeyModule
SG::ReadCondHandleKey< CondAttrListVec > m_readKeyChannel
StatusCode fillLinkStatus(SCT_ConfigurationCondData *writeCdo, SG::WriteCondHandle< SCT_ConfigurationCondData > &writeHandle, const EventContext &ctx) const
SG::ReadCondHandleKey< CondAttrListVec > m_readKeyMur
static const std::string s_coolChannelFolderName2Slim
StatusCode fillModuleData(SCT_ConfigurationCondData *writeCdo, SG::WriteCondHandle< SCT_ConfigurationCondData > &writeHandle, const EventContext &ctx) const
Class for data object used in SCT_ConfigurationCondAlg and SCT_ConfigurationConditionsTool.
std::pair< bool, bool > areBadLinks(const IdentifierHash &hash) const
Check if a module has bad links.
void setBadChips(const Identifier &moduleId, const unsigned int chipStatus)
Set bad chips for a module.
void clearBadStripIds()
Clear all bad strip identifiers.
void clearBadWaferIds()
Clear all bad wafer identifiers.
void clearBadModuleIds()
Clear all bad module identifiers.
void setBadWaferId(const Identifier &badWaferId)
Set a bad wafer identifier.
bool isBadModuleId(const Identifier &moduleId) const
Check if a module identifier is bad one.
void setBadLinks(const IdentifierHash &hash, const bool isBadLink0, const bool isBadLink1)
Set bad links for a module.
void clearBadLinks()
Clear all bad links.
const std::set< Identifier > * getBadModuleIds() const
Get all bad module identifiers.
void setBadStripId(const Identifier &badStripId, const IdentifierHash &hash, const int strip)
Set a bad strip identifier.
const std::set< Identifier > * getBadStripIds() const
Get all bad strip identifiers.
void setBadModuleId(const Identifier &badModuleId)
Set a bad module identifier.
void clearBadChips()
Clear all bad chips.
SCT_SerialNumber is a class to hold a serial number and provide check on validity,...
unsigned int to_uint() const
Truncated serial number as unsigned int.
bool is_valid() const
Until a better test is made, is_valid returns only whether its well formed.
const_pointer_type retrieve()
const std::string & key() const
void addDependency(const EventIDRange &range)
const EventIDRange & getRange() const
StatusCode record(const EventIDRange &range, T *t)
record handle, with explicit range DEPRECATED
const DataObjID & fullKey() const