|
ATLAS Offline Software
|
Go to the documentation of this file.
12 #include <nlohmann/json.hpp>
29 static const std::string databaseSignature{
"database"};
41 ATH_MSG_INFO(
"Layer/Disk masking enabled, but no layer/disk specified!");
46 ATH_MSG_INFO(
"Layer/Disk to mask specified, but masking is disabled!");
50 ATH_MSG_INFO(
"Layer/Disk side to mask specified, but masking is disabled!");
59 return StatusCode::FAILURE;
71 return StatusCode::FAILURE;
78 const std::string databaseUseString{
m_useDatabase ?
"" :
"not "};
81 <<
" elements declared bad. Database will " << databaseUseString <<
"be used.");
83 return StatusCode::SUCCESS;
89 return StatusCode::SUCCESS;
110 if (condData==
nullptr)
return true;
113 return (not condData->isBadWaferId(waferId));
118 const EventContext& ctx{Gaudi::Hive::currentContext()};
119 return isGood(elementId, ctx,
h);
130 const EventContext& ctx{Gaudi::Hive::currentContext()};
131 return isGood(hashId, ctx);
146 if (not condDataHandle.isValid()) {
155 for (
const Identifier &wafer_id: condData->badWaferIds()) {
174 if (!json_file.is_open()) {
176 return StatusCode::FAILURE;
181 for(
const auto&
i:
data)
183 std::string id_mod =
i[
"Decimal_ID"];
184 unsigned long long id_cstring = std::stoull(id_mod);
188 return StatusCode::SUCCESS;
201 std::vector<std::string>::const_iterator pId{
m_badElements.value().begin()};
202 std::vector<std::string>::const_iterator last{
m_badElements.value().end()};
203 for(; pId not_eq last;++pId) {
204 unsigned long long idToWrite{
static_cast<unsigned long long>(atoll(pId->c_str()))};
231 ATH_MSG_DEBUG(
"Successfully filled bad SCT identifiers list");
232 return (success ?
sc : StatusCode::FAILURE);
238 return condData.retrieve();
def retrieve(aClass, aKey=None)
char data[hepevt_bytes_allocation_ATLAS]
This is an Identifier helper class for the SCT subdetector. This class is a factory for creating comp...
const std::vector< bool > & getElementStatus() const
std::string find(const std::string &s)
return a remapped string
void setFilled()
Set data filled.
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
const std::string & key() const
Return the StoreGate ID for the referenced object.
Class for data object used in SCT_ModuleVetoCondAlg, SCT_LinkMaskingCondAlg, SCT_ModuleVetoTool,...
::StatusCode StatusCode
StatusCode definition for legacy code.
IdentifierHash wafer_hash(const Identifier &wafer_id) const
wafer hash from id - optimized
long unsigned int size() const
Get the number of bad wafers.
size_type wafer_hash_max(void) const
int layer_disk(const Identifier &id) const
StatusCode initialize(bool used=true)
const std::set< Identifier > & badWaferIds() const
bool isBadWaferId(const Identifier waferId) const
Check if a wafer ID is bad or not.
#define ATH_MSG_WARNING(x)
int side(const Identifier &id) 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...
void addDependency(const EventIDRange &range)
bool setBadWaferId(const Identifier waferId)
Set a bad wafer ID.