ATLAS Offline Software
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 
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 
30 public:
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>,
68  return m_badStripArray;
69  }
70 
71 private:
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
95 #include "AthenaKernel/CLASS_DEF.h"
96 CLASS_DEF( SCT_MonitorCondData , 190515334 , 1 )
97 
98 // Condition container definition for CondInputLoader
99 #include "AthenaKernel/CondCont.h"
101 
102 #endif // SCT_MONITORCONDDATA_H
CONDCONT_DEF
CONDCONT_DEF(SCT_MonitorCondData, 164599336)
SCT_MonitorCondData::SCT_MonitorCondData
SCT_MonitorCondData()
Constructor.
Definition: SCT_MonitorCondData.cxx:22
SiliconTech::strip
@ strip
SCT_MonitorCondData::m_badModuleArray
std::array< std::size_t, SCT_ConditionsData::NUMBER_OF_MODULES > m_badModuleArray
Definition: SCT_MonitorCondData.h:89
SCT_ConditionsData::NUMBER_OF_MODULES
@ NUMBER_OF_MODULES
Definition: SCT_ConditionsParameters.h:19
SCT_MonitorCondData::badStripsForModule
const std::array< std::bitset< SCT_ConditionsData::STRIPS_PER_CHIP >, SCT_ConditionsData::CHIPS_PER_SIDE > & badStripsForModule(const IdentifierHash &waferHash) const
Definition: SCT_MonitorCondData.h:58
SCT_ConditionsData::CHIPS_PER_SIDE
@ CHIPS_PER_SIDE
Definition: SCT_ConditionsParameters.h:20
SCT_ConditionsData::SIDES_PER_MODULE
@ SIDES_PER_MODULE
Definition: SCT_ConditionsParameters.h:18
SCT_MonitorCondData::~SCT_MonitorCondData
virtual ~SCT_MonitorCondData()=default
Destructor.
SCT_MonitorCondData::s_separator
static const std::string s_separator
Definition: SCT_MonitorCondData.h:91
SCT_MonitorCondData::m_defectListArray
std::array< std::string, SCT_ConditionsData::NUMBER_OF_MODULES > m_defectListArray
Store the relation between modules and defects (lists of bad strips).
Definition: SCT_MonitorCondData.h:76
SCT_ConditionsParameters.h
header file containing the number of elements and enumerated type of parameters which may be retrieve...
SCT_MonitorCondData::clearModule
void clearModule(const std::size_t moduleIndex)
Definition: SCT_MonitorCondData.cxx:139
SCT_MonitorCondData::m_badStripArray
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
Definition: SCT_MonitorCondData.h:80
SCT_MonitorCondData::find
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.
Definition: SCT_MonitorCondData.cxx:29
SCT_MonitorCondData::fillBadStrip
void fillBadStrip(const std::size_t moduleIndex, const int strip)
Definition: SCT_MonitorCondData.cxx:151
SCT_MonitorCondData::nBadStripsForChip
std::size_t nBadStripsForChip(const IdentifierHash &waferHash, const int strip) const
Get the number of bad strips for the chip, where a strip locates.
Definition: SCT_MonitorCondData.cxx:105
SCT_MonitorCondData::nBadStripsForModule
std::size_t nBadStripsForModule(const IdentifierHash &moduleHash) const
Get the number of bad strips for a module.
Definition: SCT_MonitorCondData.cxx:92
SCT_MonitorCondData::m_badChipArray
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
Definition: SCT_MonitorCondData.h:84
SCT_MonitorCondData::m_badWaferArray
std::array< std::array< std::size_t, SCT_ConditionsData::SIDES_PER_MODULE >, SCT_ConditionsData::NUMBER_OF_MODULES > m_badWaferArray
Definition: SCT_MonitorCondData.h:87
lumiFormat.array
array
Definition: lumiFormat.py:91
IdentifierHash.h
SCT_MonitorCondData::insert
void insert(const IdentifierHash &hash, const std::string &defectList)
Insert a new defect (a list of bad strips) for a module.
Definition: SCT_MonitorCondData.cxx:40
SCT_MonitorCondData::clear
void clear()
Clear m_defectListArray.
Definition: SCT_MonitorCondData.cxx:83
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:109
SCT_MonitorCondData
Class for data object used in SCT_MonitorCondAlg and SCT_MonitorConditionsTool.
Definition: SCT_MonitorCondData.h:29
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
SCT_MonitorCondData::badStrips
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
Definition: SCT_MonitorCondData.h:67
SCT_MonitorCondData::isBadStrip
bool isBadStrip(const IdentifierHash &waferHash, const int strip) const
Check if a strip is bad.
Definition: SCT_MonitorCondData.cxx:121
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
CLASS_DEF.h
macros to associate a CLID to a type
SCT_MonitorCondData::nBadStripsForWafer
std::size_t nBadStripsForWafer(const IdentifierHash &waferHash) const
Get the number of bad strips for a wafer.
Definition: SCT_MonitorCondData.cxx:98