15 bool doesNotHaveNumbers(
const std::string& numberString) {
16 return (numberString.empty() or numberString.find_first_of(
"0123456789") == std::string::npos);
33 if (
result.empty())
return false;
34 defectList = std::move(
result);
48 if (doesNotHaveNumbers(defectList))
return;
51 std::istringstream is{defectList};
52 std::istream_iterator<std::string> readString{is};
53 std::istream_iterator<std::string> endOfString;
54 for (; readString != endOfString; ++readString) {
55 const std::string& stringRange{*readString};
56 std::string::size_type p{stringRange.find(
s_separator)};
57 if (p!=std::string::npos) {
58 std::string::size_type len1{p++};
59 std::string::size_type len2{stringRange.size()-p};
60 int min{std::stoi(stringRange.substr(0, len1))};
61 int max{std::stoi(stringRange.substr(p, len2))};
66 int strip{std::stoi(*readString)};
108 if (
strip<0)
return false;
124 if (
strip<0)
return false;
136 return m_badStripArray[moduleIndex][waferIndex][chipIndex].test(stripIndex);
header file for data object for SCT_MonitorCondAlg and SCT_MonitorConditionsTool.
This is a "hash" representation of an Identifier.
std::size_t nBadStripsForModule(const IdentifierHash &moduleHash) const
Get the number of bad strips for a module.
void clear()
Clear m_defectListArray.
void insert(const IdentifierHash &hash, const std::string &defectList)
Insert a new defect (a list of bad strips) for a module.
bool find(const IdentifierHash &hash, std::string &defectList) const
Check if a module has a defect (a list of bad strips). If it does not have defect return false.
bool isBadStrip(const IdentifierHash &waferHash, const int strip) const
Check if a strip is bad.
std::array< std::array< std::array< std::bitset< SCT_ConditionsData::STRIPS_PER_CHIP >, SCT_ConditionsData::CHIPS_PER_SIDE >, SCT_ConditionsData::SIDES_PER_MODULE >, SCT_ConditionsData::NUMBER_OF_MODULES > m_badStripArray
SCT_MonitorCondData()
Constructor.
std::array< std::array< std::size_t, SCT_ConditionsData::SIDES_PER_MODULE >, SCT_ConditionsData::NUMBER_OF_MODULES > m_badWaferArray
void fillBadStrip(const std::size_t moduleIndex, const int strip)
std::array< std::size_t, SCT_ConditionsData::NUMBER_OF_MODULES > m_badModuleArray
std::size_t nBadStripsForChip(const IdentifierHash &waferHash, const int strip) const
Get the number of bad strips for the chip, where a strip locates.
std::size_t nBadStripsForWafer(const IdentifierHash &waferHash) const
Get the number of bad strips for a wafer.
std::array< std::string, SCT_ConditionsData::NUMBER_OF_MODULES > m_defectListArray
Store the relation between modules and defects (lists of bad strips).
void clearModule(const std::size_t moduleIndex)
std::array< std::array< std::array< std::size_t, SCT_ConditionsData::CHIPS_PER_SIDE >, SCT_ConditionsData::SIDES_PER_MODULE >, SCT_ConditionsData::NUMBER_OF_MODULES > m_badChipArray
static const std::string s_separator