ATLAS Offline Software
Public Types | Public Member Functions | Private Attributes | List of all members
SCT_ConfigurationCondData Class Reference

Class for data object used in SCT_ConfigurationCondAlg and SCT_ConfigurationConditionsTool. More...

#include <SCT_ConfigurationCondData.h>

Collaboration diagram for SCT_ConfigurationCondData:

Public Types

enum  { N_MODULES =4088, N_STRIPS =768, N_SIDES =2 }
 

Public Member Functions

 SCT_ConfigurationCondData ()
 Constructor. More...
 
virtual ~SCT_ConfigurationCondData ()=default
 Destructor. More...
 
void setBadStripId (const Identifier &badStripId, const IdentifierHash &hash, const int strip)
 Set a bad strip identifier. More...
 
const std::set< Identifier > * getBadStripIds () const
 Get all bad strip identifiers. More...
 
void clearBadStripIds ()
 Clear all bad strip identifiers. More...
 
bool isBadStrip (const IdentifierHash &hash, const int strip) const
 Check if a strip identifier is bad one. More...
 
void setBadWaferId (const Identifier &badWaferId)
 Set a bad wafer identifier. More...
 
const std::set< Identifier > * getBadWaferIds () const
 Get all bad wafer identifiers. More...
 
void clearBadWaferIds ()
 Clear all bad wafer identifiers. More...
 
bool isBadWaferId (const Identifier &waferId) const
 Check if a wafer identifier is bad one. More...
 
void setBadModuleId (const Identifier &badModuleId)
 Set a bad module identifier. More...
 
const std::set< Identifier > * getBadModuleIds () const
 Get all bad module identifiers. More...
 
void clearBadModuleIds ()
 Clear all bad module identifiers. More...
 
bool isBadModuleId (const Identifier &moduleId) const
 Check if a module identifier is bad one. More...
 
void setBadLinks (const IdentifierHash &hash, const bool isBadLink0, const bool isBadLink1)
 Set bad links for a module. More...
 
const std::map< IdentifierHash, std::pair< bool, bool > > * getBadLinks () const
 Get all bad links. More...
 
void clearBadLinks ()
 Clear all bad links. More...
 
std::pair< bool, bool > areBadLinks (const IdentifierHash &hash) const
 Check if a module has bad links. More...
 
void setBadChips (const Identifier &moduleId, const unsigned int chipStatus)
 Set bad chips for a module. More...
 
unsigned int getBadChips (const Identifier &moduleId) const
 Get bad chips for a module. More...
 
const std::map< Identifier, unsigned int > * getBadChips () const
 Get all bad chips. More...
 
void clearBadChips ()
 Clear all bad chips. More...
 
void clear ()
 Clear all bad information. More...
 
const std::bitset< N_STRIPS > & getBadStripsOfModule (const IdentifierHash &wafer_hash) const
 

Private Attributes

std::set< Identifierm_badStripIds
 
std::array< std::bitset< N_STRIPS >, N_MODULES *N_SIDESm_badStripArray
 
std::set< Identifierm_badWaferIds
 
std::set< Identifierm_badModuleIds
 
std::map< IdentifierHash, std::pair< bool, bool > > m_badLinks
 
std::array< std::pair< bool, bool >, N_MODULESm_badLinksArray
 
std::map< Identifier, unsigned int > m_badChips
 

Detailed Description

Class for data object used in SCT_ConfigurationCondAlg and SCT_ConfigurationConditionsTool.

Definition at line 30 of file SCT_ConfigurationCondData.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
N_MODULES 
N_STRIPS 
N_SIDES 

Definition at line 87 of file SCT_ConfigurationCondData.h.

87 {N_MODULES=4088, N_STRIPS=768, N_SIDES=2};

Constructor & Destructor Documentation

◆ SCT_ConfigurationCondData()

SCT_ConfigurationCondData::SCT_ConfigurationCondData ( )

Constructor.

Definition at line 16 of file SCT_ConfigurationCondData.cxx.

16  :
17  m_badStripIds{},
19  m_badWaferIds{},
21  m_badChips{}
22 {
23  clearBadLinks();
24 }

◆ ~SCT_ConfigurationCondData()

virtual SCT_ConfigurationCondData::~SCT_ConfigurationCondData ( )
virtualdefault

Destructor.

Member Function Documentation

◆ areBadLinks()

std::pair< bool, bool > SCT_ConfigurationCondData::areBadLinks ( const IdentifierHash hash) const

Check if a module has bad links.

Definition at line 130 of file SCT_ConfigurationCondData.cxx.

130  {
131  // Bad convetion is used. true is for good link and false is for bad link...
132  return m_badLinksArray[hash/2];
133 }

◆ clear()

void SCT_ConfigurationCondData::clear ( )

Clear all bad information.

Definition at line 162 of file SCT_ConfigurationCondData.cxx.

162  {
166  clearBadLinks();
167  clearBadChips();
168 }

◆ clearBadChips()

void SCT_ConfigurationCondData::clearBadChips ( )

Clear all bad chips.

Definition at line 156 of file SCT_ConfigurationCondData.cxx.

156  {
157  m_badChips.clear();
158 }

◆ clearBadLinks()

void SCT_ConfigurationCondData::clearBadLinks ( )

Clear all bad links.

Definition at line 123 of file SCT_ConfigurationCondData.cxx.

123  {
124  m_badLinks.clear();
125  m_badLinksArray.fill(std::make_pair(true, true));
126 }

◆ clearBadModuleIds()

void SCT_ConfigurationCondData::clearBadModuleIds ( )

Clear all bad module identifiers.

Definition at line 90 of file SCT_ConfigurationCondData.cxx.

90  {
91  m_badModuleIds.clear();
92 }

◆ clearBadStripIds()

void SCT_ConfigurationCondData::clearBadStripIds ( )

Clear all bad strip identifiers.

Definition at line 41 of file SCT_ConfigurationCondData.cxx.

41  {
42  m_badStripIds.clear();
43  m_badStripArray.fill(std::bitset<N_STRIPS>());
44 }

◆ clearBadWaferIds()

void SCT_ConfigurationCondData::clearBadWaferIds ( )

Clear all bad wafer identifiers.

Definition at line 66 of file SCT_ConfigurationCondData.cxx.

66  {
67  m_badWaferIds.clear();
68 }

◆ getBadChips() [1/2]

const std::map< Identifier, unsigned int > * SCT_ConfigurationCondData::getBadChips ( ) const

Get all bad chips.

Definition at line 150 of file SCT_ConfigurationCondData.cxx.

150  {
151  return &m_badChips;
152 }

◆ getBadChips() [2/2]

unsigned int SCT_ConfigurationCondData::getBadChips ( const Identifier moduleId) const

Get bad chips for a module.

Definition at line 143 of file SCT_ConfigurationCondData.cxx.

143  {
144  std::map<Identifier, unsigned int>::const_iterator it{m_badChips.find(moduleId)};
145  return (it!=m_badChips.end()) ? (*it).second : 0;
146 }

◆ getBadLinks()

const std::map< IdentifierHash, std::pair< bool, bool > > * SCT_ConfigurationCondData::getBadLinks ( ) const

Get all bad links.

Definition at line 117 of file SCT_ConfigurationCondData.cxx.

117  {
118  return &m_badLinks;
119 }

◆ getBadModuleIds()

const std::set< Identifier > * SCT_ConfigurationCondData::getBadModuleIds ( ) const

Get all bad module identifiers.

Definition at line 84 of file SCT_ConfigurationCondData.cxx.

84  {
85  return &m_badModuleIds;
86 }

◆ getBadStripIds()

const std::set< Identifier > * SCT_ConfigurationCondData::getBadStripIds ( ) const

Get all bad strip identifiers.

Definition at line 35 of file SCT_ConfigurationCondData.cxx.

35  {
36  return &m_badStripIds;
37 }

◆ getBadStripsOfModule()

const std::bitset<N_STRIPS>& SCT_ConfigurationCondData::getBadStripsOfModule ( const IdentifierHash wafer_hash) const
inline

Definition at line 88 of file SCT_ConfigurationCondData.h.

88 { return m_badStripArray.at(wafer_hash.value()); }

◆ getBadWaferIds()

const std::set< Identifier > * SCT_ConfigurationCondData::getBadWaferIds ( ) const

Get all bad wafer identifiers.

Definition at line 60 of file SCT_ConfigurationCondData.cxx.

60  {
61  return &m_badWaferIds;
62 }

◆ isBadModuleId()

bool SCT_ConfigurationCondData::isBadModuleId ( const Identifier moduleId) const

Check if a module identifier is bad one.

Definition at line 96 of file SCT_ConfigurationCondData.cxx.

96  {
97  return (m_badModuleIds.find(moduleId)!=m_badModuleIds.end());
98 }

◆ isBadStrip()

bool SCT_ConfigurationCondData::isBadStrip ( const IdentifierHash hash,
const int  strip 
) const

Check if a strip identifier is bad one.

Definition at line 48 of file SCT_ConfigurationCondData.cxx.

48  {
49  return m_badStripArray.at(hash.value()).test(strip);
50 }

◆ isBadWaferId()

bool SCT_ConfigurationCondData::isBadWaferId ( const Identifier waferId) const

Check if a wafer identifier is bad one.

Definition at line 72 of file SCT_ConfigurationCondData.cxx.

72  {
73  return (m_badWaferIds.find(waferId)!=m_badWaferIds.end());
74 }

◆ setBadChips()

void SCT_ConfigurationCondData::setBadChips ( const Identifier moduleId,
const unsigned int  chipStatus 
)

Set bad chips for a module.

Definition at line 137 of file SCT_ConfigurationCondData.cxx.

137  {
138  if (chipStatus!=0) m_badChips[moduleId] = chipStatus;
139 }

◆ setBadLinks()

void SCT_ConfigurationCondData::setBadLinks ( const IdentifierHash hash,
const bool  isBadLink0,
const bool  isBadLink1 
)

Set bad links for a module.

Definition at line 102 of file SCT_ConfigurationCondData.cxx.

102  {
103  unsigned int iHash{hash};
104  iHash = (iHash/2)*2; // Make iHash even
105  if (m_badLinks.count(iHash)==0) {
106  m_badLinks.insert(std::pair<IdentifierHash, std::pair<bool, bool>>(iHash, std::pair<bool, bool>(isBadLink0, isBadLink1)));
107  } else {
108  m_badLinks[iHash].first &= isBadLink0;
109  m_badLinks[iHash].second &= isBadLink1;
110  }
111  m_badLinksArray[iHash/2].first &= isBadLink0;
112  m_badLinksArray[iHash/2].second &= isBadLink1;
113 }

◆ setBadModuleId()

void SCT_ConfigurationCondData::setBadModuleId ( const Identifier badModuleId)

Set a bad module identifier.

Definition at line 78 of file SCT_ConfigurationCondData.cxx.

78  {
79  m_badModuleIds.insert(badModuleId);
80 }

◆ setBadStripId()

void SCT_ConfigurationCondData::setBadStripId ( const Identifier badStripId,
const IdentifierHash hash,
const int  strip 
)

Set a bad strip identifier.

Definition at line 28 of file SCT_ConfigurationCondData.cxx.

28  {
29  m_badStripIds.insert(badStripId);
31 }

◆ setBadWaferId()

void SCT_ConfigurationCondData::setBadWaferId ( const Identifier badWaferId)

Set a bad wafer identifier.

Definition at line 54 of file SCT_ConfigurationCondData.cxx.

54  {
55  m_badWaferIds.insert(badWaferId);
56 }

Member Data Documentation

◆ m_badChips

std::map<Identifier, unsigned int> SCT_ConfigurationCondData::m_badChips
private

Definition at line 98 of file SCT_ConfigurationCondData.h.

◆ m_badLinks

std::map<IdentifierHash, std::pair<bool, bool> > SCT_ConfigurationCondData::m_badLinks
private

Definition at line 96 of file SCT_ConfigurationCondData.h.

◆ m_badLinksArray

std::array<std::pair<bool, bool>, N_MODULES> SCT_ConfigurationCondData::m_badLinksArray
private

Definition at line 97 of file SCT_ConfigurationCondData.h.

◆ m_badModuleIds

std::set<Identifier> SCT_ConfigurationCondData::m_badModuleIds
private

Definition at line 95 of file SCT_ConfigurationCondData.h.

◆ m_badStripArray

std::array<std::bitset<N_STRIPS>, N_MODULES*N_SIDES> SCT_ConfigurationCondData::m_badStripArray
private

Definition at line 93 of file SCT_ConfigurationCondData.h.

◆ m_badStripIds

std::set<Identifier> SCT_ConfigurationCondData::m_badStripIds
private

Definition at line 92 of file SCT_ConfigurationCondData.h.

◆ m_badWaferIds

std::set<Identifier> SCT_ConfigurationCondData::m_badWaferIds
private

Definition at line 94 of file SCT_ConfigurationCondData.h.


The documentation for this class was generated from the following files:
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::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
skel.it
it
Definition: skel.GENtoEVGEN.py:396
SCT_ConfigurationCondData::clearBadModuleIds
void clearBadModuleIds()
Clear all bad module identifiers.
Definition: SCT_ConfigurationCondData.cxx:90
SCT_ConfigurationCondData::N_SIDES
@ N_SIDES
Definition: SCT_ConfigurationCondData.h:87
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::N_MODULES
@ N_MODULES
Definition: SCT_ConfigurationCondData.h:87
SCT_ConfigurationCondData::m_badStripIds
std::set< Identifier > m_badStripIds
Definition: SCT_ConfigurationCondData.h:92
SCT_ConfigurationCondData::N_STRIPS
@ N_STRIPS
Definition: SCT_ConfigurationCondData.h:87
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
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:109
SCT_ConfigurationCondData::clearBadChips
void clearBadChips()
Clear all bad chips.
Definition: SCT_ConfigurationCondData.cxx:156
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