ATLAS Offline Software
Loading...
Searching...
No Matches
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
13
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
31public:
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
90private:
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
103CLASS_DEF( SCT_ConfigurationCondData , 115061956 , 1 )
104
105// Condition container definition for CondInputLoader
106#include "AthenaKernel/CondCont.h"
108
109#endif // SCT_CONFIGURATIONDATA_H
#define CONDCONT_MIXED_DEF(...)
Definition CondCont.h:1446
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
This is a "hash" representation of an Identifier.
value_type value() const
Class for data object used in SCT_ConfigurationCondAlg and SCT_ConfigurationConditionsTool.
std::array< std::bitset< N_STRIPS >, N_MODULES *N_SIDES > m_badStripArray
std::pair< bool, bool > areBadLinks(const IdentifierHash &hash) const
Check if a module has bad links.
void setBadChips(const Identifier &moduleId, const unsigned int chipStatus)
Set bad chips for a module.
virtual ~SCT_ConfigurationCondData()=default
Destructor.
const std::map< Identifier, unsigned int > * getBadChips() const
Get all bad chips.
void clearBadStripIds()
Clear all bad strip identifiers.
bool isBadWaferId(const Identifier &waferId) const
Check if a wafer identifier is bad one.
void clearBadWaferIds()
Clear all bad wafer identifiers.
std::set< Identifier > m_badModuleIds
const std::map< IdentifierHash, std::pair< bool, bool > > * getBadLinks() const
Get all bad links.
void clearBadModuleIds()
Clear all bad module identifiers.
void setBadWaferId(const Identifier &badWaferId)
Set a bad wafer identifier.
std::array< std::pair< bool, bool >, N_MODULES > m_badLinksArray
bool isBadModuleId(const Identifier &moduleId) const
Check if a module identifier is bad one.
void setBadLinks(const IdentifierHash &hash, const bool isBadLink0, const bool isBadLink1)
Set bad links for a module.
std::map< IdentifierHash, std::pair< bool, bool > > m_badLinks
bool isBadStrip(const IdentifierHash &hash, const int strip) const
Check if a strip identifier is bad one.
void clearBadLinks()
Clear all bad links.
const std::set< Identifier > * getBadModuleIds() const
Get all bad module identifiers.
std::map< Identifier, unsigned int > m_badChips
void setBadStripId(const Identifier &badStripId, const IdentifierHash &hash, const int strip)
Set a bad strip identifier.
const std::bitset< N_STRIPS > & getBadStripsOfModule(const IdentifierHash &wafer_hash) const
void clear()
Clear all bad information.
const std::set< Identifier > * getBadStripIds() const
Get all bad strip identifiers.
const std::set< Identifier > * getBadWaferIds() const
Get all bad wafer identifiers.
void setBadModuleId(const Identifier &badModuleId)
Set a bad module identifier.
std::set< Identifier > m_badStripIds
std::set< Identifier > m_badWaferIds
void clearBadChips()
Clear all bad chips.