ATLAS Offline Software
Loading...
Searching...
No Matches
SCT_MonitorCondData.h
Go to the documentation of this file.
1// -*- C++ -*-
2
3/*
4 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
5*/
6
13
14#ifndef SCT_MONITORCONDDATA_H
15#define SCT_MONITORCONDDATA_H
16
17// Include Athena stuff
20
21#include <array>
22#include <bitset>
23#include <string>
24
30public:
31
34
36 virtual ~SCT_MonitorCondData() = default;
37
39 bool find(const IdentifierHash& hash, std::string& defectList) const;
40
42 void insert(const IdentifierHash& hash, const std::string& defectList);
43
45 void clear();
46
48 std::size_t nBadStripsForModule(const IdentifierHash& moduleHash) const;
50 std::size_t nBadStripsForWafer(const IdentifierHash& waferHash) const;
52 std::size_t nBadStripsForChip(const IdentifierHash& waferHash, const int strip) const;
54 bool isBadStrip(const IdentifierHash& waferHash, const int strip) const;
55
56 const std::array<std::bitset<SCT_ConditionsData::STRIPS_PER_CHIP>,
58 &badStripsForModule(const IdentifierHash& waferHash) const {
59 std::size_t moduleIndex{static_cast<std::size_t>(waferHash/SCT_ConditionsData::SIDES_PER_MODULE)};
60 // 0 to 1
61 std::size_t waferIndex{static_cast<std::size_t>(waferHash%SCT_ConditionsData::SIDES_PER_MODULE)};
62 return m_badStripArray[moduleIndex][waferIndex];
63 }
64 const std::array<std::array<std::array<std::bitset<SCT_ConditionsData::STRIPS_PER_CHIP>,
70
71private:
72 void clearModule(const std::size_t moduleIndex);
73 void fillBadStrip(const std::size_t moduleIndex, const int strip);
74
76 std::array<std::string, SCT_ConditionsData::NUMBER_OF_MODULES> m_defectListArray;
77 std::array<std::array<std::array<std::bitset<SCT_ConditionsData::STRIPS_PER_CHIP>,
81 std::array<std::array<std::array<std::size_t,
85 std::array<std::array<std::size_t,
88 std::array<std::size_t,
90
91 static const std::string s_separator;
92};
93
94// Class definition for StoreGate
96CLASS_DEF( SCT_MonitorCondData , 190515334 , 1 )
97
98// Condition container definition for CondInputLoader
99#include "AthenaKernel/CondCont.h"
101
102#endif // SCT_MONITORCONDDATA_H
#define CONDCONT_DEF(...)
Definition CondCont.h:1413
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
header file containing the number of elements and enumerated type of parameters which may be retrieve...
This is a "hash" representation of an Identifier.
Class for data object used in SCT_MonitorCondAlg and SCT_MonitorConditionsTool.
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.
const std::array< std::bitset< SCT_ConditionsData::STRIPS_PER_CHIP >, SCT_ConditionsData::CHIPS_PER_SIDE > & badStripsForModule(const IdentifierHash &waferHash) const
virtual ~SCT_MonitorCondData()=default
Destructor.
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
const 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 > & badStrips() const
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