ATLAS Offline Software
SCT_ConfigurationCondData.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_CONFIGURATIONCONDDATA_H
15 #define SCT_CONFIGURATIONCONDDATA_H
16 
17 #include <array>
18 #include <bitset>
19 #include <map>
20 #include <set>
21 
22 // Include Athena stuff
23 #include "Identifier/Identifier.h"
25 
31 public:
32 
35 
37  virtual ~SCT_ConfigurationCondData() = default;
38 
40  void setBadStripId(const Identifier& badStripId, const IdentifierHash& hash, const int strip);
42  const std::set<Identifier>* getBadStripIds() const;
44  void clearBadStripIds();
46  bool isBadStrip(const IdentifierHash& hash, const int strip) const;
47 
49  void setBadWaferId(const Identifier& badWaferId);
51  const std::set<Identifier>* getBadWaferIds() const;
53  void clearBadWaferIds();
55  bool isBadWaferId(const Identifier& waferId) const;
56 
58  void setBadModuleId(const Identifier& badModuleId);
60  const std::set<Identifier>* getBadModuleIds() const;
62  void clearBadModuleIds();
64  bool isBadModuleId(const Identifier& moduleId) const;
65 
67  void setBadLinks(const IdentifierHash& hash, const bool isBadLink0, const bool isBadLink1);
69  const std::map<IdentifierHash, std::pair<bool, bool>>* getBadLinks() const;
71  void clearBadLinks();
73  std::pair<bool, bool> areBadLinks(const IdentifierHash& hash) const;
74 
76  void setBadChips(const Identifier& moduleId, const unsigned int chipStatus);
78  unsigned int getBadChips(const Identifier& moduleId) const;
80  const std::map<Identifier, unsigned int>* getBadChips() const;
82  void clearBadChips();
83 
85  void clear();
86 
87  enum {N_MODULES=4088, N_STRIPS=768, N_SIDES=2};
88  const std::bitset<N_STRIPS> &getBadStripsOfModule(const IdentifierHash& wafer_hash) const { return m_badStripArray.at(wafer_hash.value()); }
89 
90 private:
91 
92  std::set<Identifier> m_badStripIds;
93  std::array<std::bitset<N_STRIPS>, N_MODULES*N_SIDES> m_badStripArray;
94  std::set<Identifier> m_badWaferIds;
95  std::set<Identifier> m_badModuleIds;
96  std::map<IdentifierHash, std::pair<bool, bool>> m_badLinks;
97  std::array<std::pair<bool, bool>, N_MODULES> m_badLinksArray;
98  std::map<Identifier, unsigned int> m_badChips;
99 };
100 
101 // Class definition for StoreGate
102 #include "AthenaKernel/CLASS_DEF.h"
103 CLASS_DEF( SCT_ConfigurationCondData , 115061956 , 1 )
104 
105 // Condition container definition for CondInputLoader
106 #include "AthenaKernel/CondCont.h"
108 
109 #endif // SCT_CONFIGURATIONDATA_H
SCT_ConfigurationCondData::setBadWaferId
void setBadWaferId(const Identifier &badWaferId)
Set a bad wafer identifier.
Definition: SCT_ConfigurationCondData.cxx:54
SiliconTech::strip
@ strip
SCT_ConfigurationCondData::m_badLinks
std::map< IdentifierHash, std::pair< bool, bool > > m_badLinks
Definition: SCT_ConfigurationCondData.h:96
SCT_ConfigurationCondData::m_badWaferIds
std::set< Identifier > m_badWaferIds
Definition: SCT_ConfigurationCondData.h:94
IdentifierHash::value
unsigned int value() const
SCT_ConfigurationCondData::setBadLinks
void setBadLinks(const IdentifierHash &hash, const bool isBadLink0, const bool isBadLink1)
Set bad links for a module.
Definition: SCT_ConfigurationCondData.cxx:102
SCT_ConfigurationCondData::N_SIDES
@ N_SIDES
Definition: SCT_ConfigurationCondData.h:87
SCT_ConfigurationCondData::getBadStripIds
const std::set< Identifier > * getBadStripIds() const
Get all bad strip identifiers.
Definition: SCT_ConfigurationCondData.cxx:35
SCT_ConfigurationCondData::m_badModuleIds
std::set< Identifier > m_badModuleIds
Definition: SCT_ConfigurationCondData.h:95
SCT_ConfigurationCondData::clearBadLinks
void clearBadLinks()
Clear all bad links.
Definition: SCT_ConfigurationCondData.cxx:123
SCT_ConfigurationCondData::clearBadModuleIds
void clearBadModuleIds()
Clear all bad module identifiers.
Definition: SCT_ConfigurationCondData.cxx:90
SCT_ConfigurationCondData::N_STRIPS
@ N_STRIPS
Definition: SCT_ConfigurationCondData.h:87
SCT_ConfigurationCondData::isBadModuleId
bool isBadModuleId(const Identifier &moduleId) const
Check if a module identifier is bad one.
Definition: SCT_ConfigurationCondData.cxx:96
SCT_ConfigurationCondData::m_badStripArray
std::array< std::bitset< N_STRIPS >, N_MODULES *N_SIDES > m_badStripArray
Definition: SCT_ConfigurationCondData.h:93
SCT_ConfigurationCondData::m_badLinksArray
std::array< std::pair< bool, bool >, N_MODULES > m_badLinksArray
Definition: SCT_ConfigurationCondData.h:97
SCT_ConfigurationCondData::getBadLinks
const std::map< IdentifierHash, std::pair< bool, bool > > * getBadLinks() const
Get all bad links.
Definition: SCT_ConfigurationCondData.cxx:117
SCT_ConfigurationCondData::setBadStripId
void setBadStripId(const Identifier &badStripId, const IdentifierHash &hash, const int strip)
Set a bad strip identifier.
Definition: SCT_ConfigurationCondData.cxx:28
SCT_ConfigurationCondData::SCT_ConfigurationCondData
SCT_ConfigurationCondData()
Constructor.
Definition: SCT_ConfigurationCondData.cxx:16
SCT_ConfigurationCondData::N_MODULES
@ N_MODULES
Definition: SCT_ConfigurationCondData.h:87
SCT_ConfigurationCondData::~SCT_ConfigurationCondData
virtual ~SCT_ConfigurationCondData()=default
Destructor.
SCT_ConfigurationCondData::m_badStripIds
std::set< Identifier > m_badStripIds
Definition: SCT_ConfigurationCondData.h:92
SCT_ConfigurationCondData
Class for data object used in SCT_ConfigurationCondAlg and SCT_ConfigurationConditionsTool.
Definition: SCT_ConfigurationCondData.h:30
SCT_ConfigurationCondData::m_badChips
std::map< Identifier, unsigned int > m_badChips
Definition: SCT_ConfigurationCondData.h:98
SCT_ConfigurationCondData::clearBadWaferIds
void clearBadWaferIds()
Clear all bad wafer identifiers.
Definition: SCT_ConfigurationCondData.cxx:66
SCT_ConfigurationCondData::clearBadStripIds
void clearBadStripIds()
Clear all bad strip identifiers.
Definition: SCT_ConfigurationCondData.cxx:41
SCT_ConfigurationCondData::clear
void clear()
Clear all bad information.
Definition: SCT_ConfigurationCondData.cxx:162
IdentifierHash.h
SCT_ConfigurationCondData::areBadLinks
std::pair< bool, bool > areBadLinks(const IdentifierHash &hash) const
Check if a module has bad links.
Definition: SCT_ConfigurationCondData.cxx:130
SCT_ConfigurationCondData::isBadStrip
bool isBadStrip(const IdentifierHash &hash, const int strip) const
Check if a strip identifier is bad one.
Definition: SCT_ConfigurationCondData.cxx:48
SCT_ConfigurationCondData::getBadStripsOfModule
const std::bitset< N_STRIPS > & getBadStripsOfModule(const IdentifierHash &wafer_hash) const
Definition: SCT_ConfigurationCondData.h:88
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:109
SCT_ConfigurationCondData::clearBadChips
void clearBadChips()
Clear all bad chips.
Definition: SCT_ConfigurationCondData.cxx:156
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_ConfigurationCondData::setBadModuleId
void setBadModuleId(const Identifier &badModuleId)
Set a bad module identifier.
Definition: SCT_ConfigurationCondData.cxx:78
SCT_ConfigurationCondData::setBadChips
void setBadChips(const Identifier &moduleId, const unsigned int chipStatus)
Set bad chips for a module.
Definition: SCT_ConfigurationCondData.cxx:137
SCT_ConfigurationCondData::getBadModuleIds
const std::set< Identifier > * getBadModuleIds() const
Get all bad module identifiers.
Definition: SCT_ConfigurationCondData.cxx:84
SCT_ConfigurationCondData::getBadWaferIds
const std::set< Identifier > * getBadWaferIds() const
Get all bad wafer identifiers.
Definition: SCT_ConfigurationCondData.cxx:60
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_ConfigurationCondData::getBadChips
const std::map< Identifier, unsigned int > * getBadChips() const
Get all bad chips.
Definition: SCT_ConfigurationCondData.cxx:150
SCT_ConfigurationCondData::isBadWaferId
bool isBadWaferId(const Identifier &waferId) const
Check if a wafer identifier is bad one.
Definition: SCT_ConfigurationCondData.cxx:72
CONDCONT_MIXED_DEF
CONDCONT_MIXED_DEF(SCT_ConfigurationCondData, 23220694)
Identifier
Definition: IdentifierFieldParser.cxx:14