1 #ifndef CondFormats_HGCalObjects_interface_HGCalMappingCellParameterIndex_h 2 #define CondFormats_HGCalObjects_interface_HGCalMappingCellParameterIndex_h 32 uint16_t erx = chip * 2 + half + 1;
60 throw cms::Exception(
"ValueError") <<
" unable to find typecode=" << typecode <<
" in cell indexer";
71 throw cms::Exception(
"ValueError") <<
" unable to find typecode corresponding to idx=" <<
idx;
86 throw cms::Exception(
"ValueError") <<
" index requested for cell dense indexer (i=" <<
idx 87 <<
") is larger than allocated";
116 throw cms::Exception(
"ValueError") <<
" index requested for cell dense indexer (i=" <<
idx 117 <<
") is larger than allocated";
119 auto rtn_codes =
di_[
idx].unpackDenseIndex(rtn);
157 std::vector<HGCalDenseIndexerBase>
di_;
static constexpr uint16_t maxChPerErx_
uint32_t elecIdFromIndex(uint32_t rtn, size_t idx) const
uint32_t denseIndex(size_t idx, uint32_t chip, uint32_t half, uint32_t seq) const
uint32_t maxDenseIndex() const
returns the max. dense index expected
void processNewCell(std::string typecode, uint16_t chip, uint16_t half)
size_t getNErxExpectedFor(size_t typecodeidx) const
uint32_t denseIndex(std::string typecode, uint32_t chip, uint32_t half, uint32_t seq) const
builders for the dense index
size_t getEnumFromTypecode(std::string typecode) const
gets index given typecode string
HGCalDenseIndexerBase getDenseIndexerFor(size_t idx) const
returns the dense indexer for a given internal index
HGCalMappingCellIndexer()=default
~HGCalMappingCellIndexer()
this is a simple class that takes care of building a dense index for a set of categories the maximum ...
wrapper for a 32b data word identifying a readout channel in the raw data The format is the following...
uint32_t denseIndex(size_t idx, uint32_t erx, uint32_t seq) const
HGCalDenseIndexerBase getDenseIndexFor(std::string typecode) const
returns the dense indexer for a typecode
void update()
process the current list of type codes handled and updates the dense indexers
utility class to assign dense readout cell indexing
uint32_t denseIndex(std::string typecode, uint32_t erx, uint32_t seq) const
#define COND_SERIALIZABLE
std::map< std::string, size_t > typeCodeIndexer_
size_t getNWordsExpectedFor(std::string typecode) const
gets the number of words for a given typecode
uint32_t elecIdFromIndex(uint32_t rtn, std::string typecode) const
decodes the dense index code
static constexpr char maxHalfPerROC_
std::string getTypecodeFromEnum(size_t idx) const
checks if there is a typecode corresponding to an index
std::vector< uint32_t > offsets_
std::vector< uint16_t > maxErx_
std::vector< HGCalDenseIndexerBase > di_
size_t getNWordsExpectedFor(size_t typecodeidx) const
size_t getNErxExpectedFor(std::string typecode) const
gets the number of e-Rx for a given typecode