|
ATLAS Offline Software
|
Class for keeping track of errors caught by the monitoring.
More...
#include <SCT_MonitorConditionsTool.h>
|
| SCT_MonitorConditionsTool (const std::string &type, const std::string &name, const IInterface *parent) |
|
virtual | ~SCT_MonitorConditionsTool ()=default |
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | finalize () override |
|
virtual bool | canReportAbout (InDetConditions::Hierarchy h) const override |
| Can the service report about the given component? (chip, module...) More...
|
|
virtual bool | isGood (const Identifier &elementId, InDetConditions::Hierarchy h=InDetConditions::DEFAULT) const override |
| Is the detector element good? More...
|
|
virtual bool | isGood (const Identifier &elementId, const EventContext &ctx, InDetConditions::Hierarchy h=InDetConditions::DEFAULT) const override |
|
virtual bool | isGood (const IdentifierHash &hashId) const override |
| is it good?, using wafer hash More...
|
|
virtual bool | isGood (const IdentifierHash &hashId, const EventContext &ctx) const override |
|
virtual void | getDetectorElementStatus (const EventContext &ctx, InDet::SiDetectorElementStatus &element_status, SG::WriteCondHandle< InDet::SiDetectorElementStatus > *whandle) const override |
|
virtual void | badStrips (std::set< Identifier > &strips) const override |
| List of bad strip Identifiers. More...
|
|
virtual void | badStrips (std::set< Identifier > &strips, const EventContext &ctx) const override |
|
virtual void | badStrips (const Identifier &moduleId, std::set< Identifier > &strips) const override |
| List of bad strip Identifiers for a given module. More...
|
|
virtual void | badStrips (const Identifier &moduleId, std::set< Identifier > &strips, const EventContext &ctx) const override |
|
virtual std::string | badStripsAsString (const Identifier &moduleId) const override |
| String of bad strip numbers for a given module. More...
|
|
virtual std::string | badStripsAsString (const Identifier &moduleId, const EventContext &ctx) const override |
|
|
static void | expandRange (const std::string &rangeStr, std::set< int > &rangeList) |
|
static void | expandList (const std::string &defectStr, std::set< int > &defectList) |
|
Class for keeping track of errors caught by the monitoring.
Definition at line 32 of file SCT_MonitorConditionsTool.h.
◆ SCT_MonitorConditionsTool()
SCT_MonitorConditionsTool::SCT_MonitorConditionsTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~SCT_MonitorConditionsTool()
virtual SCT_MonitorConditionsTool::~SCT_MonitorConditionsTool |
( |
| ) |
|
|
virtualdefault |
◆ badStrips() [1/4]
◆ badStrips() [2/4]
Definition at line 232 of file SCT_MonitorConditionsTool.cxx.
235 std::string defectStr{
getList(moduleId, ctx)};
236 if (doesNotHaveNumbers(defectStr))
return;
239 std::set<int> defectList;
243 std::set<int>::const_iterator defectItr{defectList.begin()}, defectEnd{defectList.end()};
244 for (; defectItr!=defectEnd; ++defectItr) {
254 ATH_MSG_DEBUG(
"Bad Strip: Strip number in DB = " << *defectItr<<
", side/offline strip number = " <<
side <<
"/" << stripNum<<
", Identifier = " << stripId);
256 strips.insert(stripId);
◆ badStrips() [3/4]
void SCT_MonitorConditionsTool::badStrips |
( |
std::set< Identifier > & |
strips | ) |
const |
|
overridevirtual |
◆ badStrips() [4/4]
void SCT_MonitorConditionsTool::badStrips |
( |
std::set< Identifier > & |
strips, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
overridevirtual |
◆ badStripsAsString() [1/2]
std::string SCT_MonitorConditionsTool::badStripsAsString |
( |
const Identifier & |
moduleId | ) |
const |
|
overridevirtual |
String of bad strip numbers for a given module.
Definition at line 274 of file SCT_MonitorConditionsTool.cxx.
275 const EventContext& ctx{Gaudi::Hive::currentContext()};
◆ badStripsAsString() [2/2]
std::string SCT_MonitorConditionsTool::badStripsAsString |
( |
const Identifier & |
moduleId, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
overridevirtual |
◆ canReportAbout()
◆ expandList()
void SCT_MonitorConditionsTool::expandList |
( |
const std::string & |
defectStr, |
|
|
std::set< int > & |
defectList |
|
) |
| |
|
staticprivate |
Definition at line 320 of file SCT_MonitorConditionsTool.cxx.
324 if (doesNotHaveNumbers(defectStr))
return;
326 std::istringstream is{defectStr};
327 std::istream_iterator<std::string> defectItr{is};
328 std::istream_iterator<std::string> defectEnd;
331 for (; defectItr != defectEnd; ++defectItr)
expandRange(*defectItr, defectList);
◆ expandRange()
void SCT_MonitorConditionsTool::expandRange |
( |
const std::string & |
rangeStr, |
|
|
std::set< int > & |
rangeList |
|
) |
| |
|
staticprivate |
Definition at line 299 of file SCT_MonitorConditionsTool.cxx.
302 std::string::size_type sepPos{rangeStr.find(
s_separator)};
304 if (sepPos != std::string::npos) {
306 std::string::size_type len1{sepPos++}, len2{rangeStr.size()-sepPos};
307 int min{std::stoi(rangeStr.substr(0,len1))};
308 int max{std::stoi(rangeStr.substr(sepPos,len2))};
310 while (
min != (
max+1)) rangeList.insert(
min++);
313 rangeList.insert(std::stoi(rangeStr));
◆ finalize()
StatusCode SCT_MonitorConditionsTool::finalize |
( |
| ) |
|
|
overridevirtual |
◆ getCondData()
◆ getDetectorElementStatus()
Definition at line 133 of file SCT_MonitorConditionsTool.cxx.
136 if (not condDataHandle.isValid()) {
154 if (chip_status.empty()) {
160 std::vector<std::vector<unsigned short> > &bad_strips = element_status.
getBadCells();
161 if (bad_strips.empty()) {
162 bad_strips.resize(
status.size());
165 std::vector<std::pair<unsigned int, unsigned int> > tmp_bad_strips;
166 for (
unsigned int module_hash=0; module_hash<
status.size(); ++module_hash) {
169 std::vector<unsigned short> &bad_module_strips_out = bad_strips.at(module_hash);
170 std::array<unsigned int, SCT::N_CHIPS_PER_SIDE> bad_strip_counts{};
172 const std::array<std::bitset<SCT_ConditionsData::STRIPS_PER_CHIP>,
174 &bad_module_strips_in = condData->badStripsForModule(moduleHash);
176 unsigned int strip_i=0;
177 tmp_bad_strips.clear();
180 for (
const auto& chip_i : bad_module_strips_in) {
183 for (
unsigned int strip_per_chip_i=0; strip_per_chip_i<chip_i.size(); ++strip_per_chip_i) {
184 if (chip_i.test(strip_per_chip_i)) {
185 tmp_bad_strips.emplace_back(geoemtrical_chip_id,strip_i);
186 ++bad_strip_counts.at(geoemtrical_chip_id);
193 for (
unsigned int the_chip=0; the_chip< bad_strip_counts.size(); ++the_chip) {
196 chip_status[module_hash] &= ~bad_chips;
198 for (
const std::pair<unsigned int, unsigned int> &chip_and_strip : tmp_bad_strips) {
199 unsigned int strip_i=chip_and_strip.second;
200 std::vector<unsigned short>::const_iterator iter = std::lower_bound(bad_module_strips_out.begin(),bad_module_strips_out.end(),strip_i);
201 if (iter == bad_module_strips_out.end() || *iter != strip_i) {
202 bad_module_strips_out.insert( iter, strip_i);
◆ getList()
std::string SCT_MonitorConditionsTool::getList |
( |
const Identifier & |
imodule, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
private |
Definition at line 284 of file SCT_MonitorConditionsTool.cxx.
285 string currentDefectList{
""};
289 condData->find(moduleHash, currentDefectList);
293 return currentDefectList;
◆ initialize()
StatusCode SCT_MonitorConditionsTool::initialize |
( |
| ) |
|
|
overridevirtual |
◆ isGood() [1/4]
◆ isGood() [2/4]
◆ isGood() [3/4]
◆ isGood() [4/4]
◆ m_condKey
◆ m_nhits_noisychip
UnsignedIntegerProperty SCT_MonitorConditionsTool::m_nhits_noisychip {this, "Nnoisychip", 64} |
|
private |
◆ m_nhits_noisymodule
UnsignedIntegerProperty SCT_MonitorConditionsTool::m_nhits_noisymodule {this, "Nnoisycmodule", 768} |
|
private |
◆ m_nhits_noisywafer
UnsignedIntegerProperty SCT_MonitorConditionsTool::m_nhits_noisywafer {this, "Nnoisywafer", 384} |
|
private |
◆ m_pHelper
const SCT_ID* SCT_MonitorConditionsTool::m_pHelper {nullptr} |
|
private |
◆ s_separator
const string SCT_MonitorConditionsTool::s_separator {"-"} |
|
staticprivate |
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
const std::vector< bool > & getElementStatus() const
constexpr unsigned int N_SIDES
const_id_iterator wafer_begin(void) const
Iterators over full set of ids. Wafer iterator is sorted.
const std::vector< std::vector< unsigned short > > & getBadCells() const
std::vector< Identifier >::const_iterator const_id_iterator
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
int phi_module(const Identifier &id) const
const std::string & key() const
Return the StoreGate ID for the referenced object.
Identifier module_id(int barrel_ec, int layer_disk, int phi_module, int eta_module) const
For a single crystal.
IdentifierHash wafer_hash(const Identifier &wafer_id) const
wafer hash from id - optimized
size_type wafer_hash_max(void) const
int layer_disk(const Identifier &id) const
StatusCode initialize(bool used=true)
int strip(const Identifier &id) const
const std::vector< ChipFlags_t > & getElementChipStatus() const
Class for data object used in SCT_MonitorCondAlg and SCT_MonitorConditionsTool.
int eta_module(const Identifier &id) const
constexpr unsigned int getGeometricalChipID(unsigned int strip)
Get the geometrical chip ID for the given strip.
unsigned short ChipFlags_t
int side(const Identifier &id) const
const_id_iterator wafer_end(void) const
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side) const
For a single side of module.
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
constexpr unsigned int N_CHIPS_PER_SIDE
void addDependency(const EventIDRange &range)
Identifier strip_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side, int strip) const
For an individual strip.