|
ATLAS Offline Software
|
Go to the documentation of this file.
12 #ifndef INDETREADOUTGEOMETRY_SIDETECTORELEMENTINFO_H
13 #define INDETREADOUTGEOMETRY_SIDETECTORELEMENTINFO_H
27 #ifdef DO_VALIDATE_STATUS_ARRAY
28 #define VALIDATE_STATUS_ARRAY_ACTIVATED true
31 void break_point(
bool input1,
bool input2,
const char *
label);
32 void break_point(
double input1,
double input2,
const char *
label);
38 #define VALIDATE_STATUS_ARRAY( use_info, info_val, summary_val) \
40 auto is_good = summary_val; \
41 auto is_good_precomp = (use_info) ? info_val : is_good; \
42 if (is_good != is_good_precomp) { \
43 dbg::break_point(is_good, is_good_precomp,#info_val); \
44 [[maybe_unused]] auto is_good_precomp2 = info_val; \
45 [[maybe_unused]] auto is_good2 = summary_val; \
46 throw std::logic_error("Inconsistent conditions summary information." ); \
50 #define VALIDATE_STATUS_ARRAY_ACTIVATED false
51 #define VALIDATE_STATUS_ARRAY( use_info, info_val, summary_val) do { } while (0)
57 class SiDetectorDesign;
78 const std::vector<std::vector<unsigned short> > &bad_cells)
108 const std::vector<unsigned short> &bad_cells= std::as_const(
m_badCells)->at(
hash);
109 return !std::binary_search(bad_cells.begin(),bad_cells.end(),cell_i);
132 m_badCells =
new std::vector<std::vector<unsigned short> > (*m_badCells);
139 std::vector<std::vector<unsigned short> > *
m_badCells =
nullptr;
150 #endif // INDETREADOUTGEOMETRY_SIDETECTORELEMENTINFO_H
const std::vector< bool > & getElementStatus() const
std::vector< ChipFlags_t > m_elementChipStatus
bool isChipGood(IdentifierHash hash, unsigned int chip) const
SiDetectorElementStatus(const InDetDD::SiDetectorElementCollection &detector_elements, const std::vector< std::vector< unsigned short > > &bad_cells)
std::vector< bool > m_elementStatus
const InDetDD::SiDetectorElement * getDetectorElement(const IdentifierHash &hash) const
std::vector< ChipFlags_t > & getElementChipStatus()
std::vector< std::vector< unsigned short > > * m_badCells
const std::vector< std::vector< unsigned short > > & getBadCells() const
bool isCellGood(IdentifierHash hash, unsigned short cell_i) const
virtual unsigned int numberOfChips(const InDetDD::SiDetectorDesign &design) const =0
virtual ~SiDetectorElementStatus()
SiDetectorElementStatus & merge(const SiDetectorElementStatus &a)
bitwise AND of module and chip status bits.
SiDetectorElementStatus(const InDetDD::SiDetectorElementCollection &detector_elements)
SiDetectorElementStatus & operator=(const SiDetectorElementStatus &)=delete
SiDetectorElementStatus(const SiDetectorElementStatus &si_detector_element_status)
const InDetDD::SiDetectorElementCollection * m_detectorElements
std::vector< bool > & getElementStatus()
static void notOwningBadCells()
bool isGood(IdentifierHash hash) const
const std::vector< InDetDD::SiDetectorElement * > & getDetectorElements() const
CONDCONT_MIXED_DEF(InDet::SiDetectorElementStatus, 207353830)
unsigned int numberOfChips(const IdentifierHash &hash) const
const std::vector< ChipFlags_t > & getElementChipStatus() const
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
unsigned short ChipFlags_t
std::vector< std::vector< unsigned short > > & getBadCells()
Get a non-const bad cells container owned by this instance.
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
macros to associate a CLID to a type