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);
33 void break_point( uint64_t input1, uint64_t 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;
#define CONDCONT_MIXED_DEF(...)
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.
Base class for the detector design classes for Pixel and SCT.
Class to hold the SiDetectorElement objects to be put in the detector store.
Class to hold geometrical description of a silicon detector element.
std::vector< bool > m_elementStatus
SiDetectorElementStatus(const InDetDD::SiDetectorElementCollection &detector_elements, const std::vector< std::vector< unsigned short > > &bad_cells)
virtual ~SiDetectorElementStatus()
virtual unsigned int numberOfChips(const InDetDD::SiDetectorDesign &design) const =0
const InDetDD::SiDetectorElementCollection * m_detectorElements
const std::vector< bool > & getElementStatus() const
bool isChipGood(IdentifierHash hash, unsigned int chip) const
std::vector< std::vector< unsigned short > > * m_badCells
const InDetDD::SiDetectorElement * getDetectorElement(const IdentifierHash &hash) const
std::vector< std::vector< unsigned short > > & getBadCells()
Get a non-const bad cells container owned by this instance.
const InDetDD::SiDetectorElementCollection & getDetectorElements() const
const std::vector< ChipFlags_t > & getElementChipStatus() const
SiDetectorElementStatus(const InDetDD::SiDetectorElementCollection &detector_elements)
static void notOwningBadCells()
bool isCellGood(IdentifierHash hash, unsigned short cell_i) const
std::vector< ChipFlags_t > & getElementChipStatus()
unsigned int numberOfChips(const IdentifierHash &hash) const
bool isGood(IdentifierHash hash) const
std::vector< bool > & getElementStatus()
SiDetectorElementStatus(const SiDetectorElementStatus &si_detector_element_status)
SiDetectorElementStatus & operator=(const SiDetectorElementStatus &)=delete
std::vector< ChipFlags_t > m_elementChipStatus
const std::vector< std::vector< unsigned short > > & getBadCells() const
unsigned short ChipFlags_t
std::string label(const std::string &format, int i)