utility class to assign dense readout module indexing the class holds the information on the expected readout sequence (module types) per FED and their offset in the SoAs of data More...
#include <HGCalMappingModuleIndexer.h>
Public Member Functions | |
void | finalize () |
uint32_t | getIndexForModule (uint32_t fedid, uint32_t nmod) const |
returns the index for the n-th module in the readout sequence of a FED if the index in the readout sequence is unknown alternative methods which take the (capture block, econd idx) are provided which will find first what should be the internal dense index (index in the readout sequence) More... | |
uint32_t | getIndexForModule (uint32_t fedid, uint16_t captureblockIdx, uint16_t econdIdx) const |
uint32_t | getIndexForModuleData (uint32_t fedid, uint32_t nmod, uint32_t erxidx, uint32_t chidx) const |
uint32_t | getIndexForModuleData (uint32_t fedid, uint16_t captureblockIdx, uint16_t econdIdx, uint32_t erxidx, uint32_t chidx) const |
uint32_t | getIndexForModuleErx (uint32_t fedid, uint32_t nmod, uint32_t erxidx) const |
uint32_t | getIndexForModuleErx (uint32_t fedid, uint16_t captureblockIdx, uint16_t econdIdx, uint32_t erxidx) const |
int | getTypeForModule (uint32_t fedid, uint32_t nmod) const |
int | getTypeForModule (uint32_t fedid, uint16_t captureblockIdx, uint16_t econdIdx) const |
internal indexer More... | |
HGCalMappingModuleIndexer () | |
void | processNewModule (uint32_t fedid, uint16_t captureblockIdx, uint16_t econdIdx, uint32_t typecodeIdx, uint32_t nerx, uint32_t nwords) |
for a new module it adds it's type to the readaout sequence vector if the fed id is not yet existing in the mapping it's added a dense indexer is used to create the necessary indices for the new module unused indices will be set with -1 More... | |
~HGCalMappingModuleIndexer ()=default | |
Static Public Member Functions | |
static std::pair< bool, int > | convertTypeCode (std::string_view typecode) |
decodes silicon or sipm type and cell type for the detector id from the typecode string More... | |
Public Attributes | |
std::vector< uint32_t > | dataOffsets_ |
global counters (sizes of vectors) More... | |
std::vector< uint32_t > | erxOffsets_ |
std::vector< HGCalFEDReadoutSequence_t > | fedReadoutSequences_ |
global counters for types of modules, number of e-Rx and words More... | |
std::vector< uint32_t > | globalTypesCounter_ |
std::vector< uint32_t > | globalTypesNErx_ |
std::vector< uint32_t > | globalTypesNWords_ |
base offsets to apply per module type with different granularity : module, e-Rx, channel data More... | |
uint32_t | maxDataIdx_ |
uint32_t | maxErxIdx_ |
uint32_t | maxModulesIdx_ |
max number of main buffers/capture blocks per FED More... | |
HGCalDenseIndexerBase | modFedIndexer_ |
the sequence of FED readout sequence descriptors More... | |
std::vector< uint32_t > | moduleOffsets_ |
uint32_t | nfeds_ |
Static Public Attributes | |
static constexpr uint32_t | maxCBperFED_ = 10 |
max number of ECON-Ds processed by a main buffer/capture block More... | |
static constexpr uint32_t | maxECONDperCB_ = 12 |
Private Member Functions | |
uint32_t | denseIndexingFor (uint32_t fedid, uint16_t captureblockIdx, uint16_t econdIdx) const |
given capture block and econd indices returns the dense indexer More... | |
template<class Archive > | |
void | serialize (Archive &ar, const unsigned int version) |
Friends | |
class | boost::serialization::access |
template<typename CondSerializationT , typename Enabled > | |
struct | cond::serialization::access |
utility class to assign dense readout module indexing the class holds the information on the expected readout sequence (module types) per FED and their offset in the SoAs of data
Definition at line 34 of file HGCalMappingModuleIndexer.h.
|
inline |
Definition at line 36 of file HGCalMappingModuleIndexer.h.
References maxCBperFED_, and maxECONDperCB_.
|
default |
|
inlinestatic |
decodes silicon or sipm type and cell type for the detector id from the typecode string
Definition at line 151 of file HGCalMappingModuleIndexer.h.
References HcalObjRepresent::isSiPM(), and funct::true.
|
inlineprivate |
given capture block and econd indices returns the dense indexer
Definition at line 219 of file HGCalMappingModuleIndexer.h.
References HGCalDenseIndexerBase::denseIndex(), Exception, PixelSLinkDataInputSource_cfi::fedid, fedReadoutSequences_, heavyIonCSV_trainingSettings::idx, modFedIndexer_, and nfeds_.
Referenced by getIndexForModule(), getIndexForModuleData(), getIndexForModuleErx(), and getTypeForModule().
|
inline |
Definition at line 81 of file HGCalMappingModuleIndexer.h.
References dataOffsets_, erxOffsets_, fedReadoutSequences_, globalTypesCounter_, globalTypesNErx_, globalTypesNWords_, mps_fire::i, maxDataIdx_, maxErxIdx_, maxModulesIdx_, moduleOffsets_, nfeds_, and heppy_batch::val.
Referenced by HGCalMappingESProducer::prepareModuleMapperIndexer().
|
inline |
returns the index for the n-th module in the readout sequence of a FED if the index in the readout sequence is unknown alternative methods which take the (capture block, econd idx) are provided which will find first what should be the internal dense index (index in the readout sequence)
Definition at line 170 of file HGCalMappingModuleIndexer.h.
References PixelSLinkDataInputSource_cfi::fedid, and fedReadoutSequences_.
Referenced by getIndexForModule().
|
inline |
Definition at line 173 of file HGCalMappingModuleIndexer.h.
References denseIndexingFor(), PixelSLinkDataInputSource_cfi::fedid, and getIndexForModule().
|
inline |
Definition at line 184 of file HGCalMappingModuleIndexer.h.
References PixelSLinkDataInputSource_cfi::fedid, fedReadoutSequences_, and HGCalMappingCellIndexer::maxChPerErx_.
Referenced by getIndexForModuleData().
|
inline |
Definition at line 187 of file HGCalMappingModuleIndexer.h.
References denseIndexingFor(), PixelSLinkDataInputSource_cfi::fedid, and getIndexForModuleData().
|
inline |
Definition at line 177 of file HGCalMappingModuleIndexer.h.
References PixelSLinkDataInputSource_cfi::fedid, and fedReadoutSequences_.
Referenced by getIndexForModuleErx().
|
inline |
Definition at line 180 of file HGCalMappingModuleIndexer.h.
References denseIndexingFor(), PixelSLinkDataInputSource_cfi::fedid, and getIndexForModuleErx().
|
inline |
Definition at line 193 of file HGCalMappingModuleIndexer.h.
References PixelSLinkDataInputSource_cfi::fedid, and fedReadoutSequences_.
Referenced by getTypeForModule().
|
inline |
internal indexer
Definition at line 194 of file HGCalMappingModuleIndexer.h.
References denseIndexingFor(), PixelSLinkDataInputSource_cfi::fedid, and getTypeForModule().
|
inline |
for a new module it adds it's type to the readaout sequence vector if the fed id is not yet existing in the mapping it's added a dense indexer is used to create the necessary indices for the new module unused indices will be set with -1
Definition at line 46 of file HGCalMappingModuleIndexer.h.
References dataOffsets_, HGCalDenseIndexerBase::denseIndex(), PixelSLinkDataInputSource_cfi::fedid, fedReadoutSequences_, globalTypesCounter_, globalTypesNErx_, globalTypesNWords_, HGCalFEDReadoutSequence_t::id, heavyIonCSV_trainingSettings::idx, modFedIndexer_, and HGCalFEDReadoutSequence_t::readoutTypes_.
Referenced by HGCalMappingESProducer::prepareModuleMapperIndexer().
|
private |
|
friend |
Definition at line 231 of file HGCalMappingModuleIndexer.h.
|
friend |
Definition at line 231 of file HGCalMappingModuleIndexer.h.
std::vector<uint32_t> HGCalMappingModuleIndexer::dataOffsets_ |
global counters (sizes of vectors)
Definition at line 206 of file HGCalMappingModuleIndexer.h.
Referenced by finalize(), and processNewModule().
std::vector<uint32_t> HGCalMappingModuleIndexer::erxOffsets_ |
Definition at line 206 of file HGCalMappingModuleIndexer.h.
Referenced by finalize().
std::vector<HGCalFEDReadoutSequence_t> HGCalMappingModuleIndexer::fedReadoutSequences_ |
global counters for types of modules, number of e-Rx and words
Definition at line 202 of file HGCalMappingModuleIndexer.h.
Referenced by denseIndexingFor(), finalize(), getIndexForModule(), getIndexForModuleData(), getIndexForModuleErx(), getTypeForModule(), and processNewModule().
std::vector<uint32_t> HGCalMappingModuleIndexer::globalTypesCounter_ |
Definition at line 204 of file HGCalMappingModuleIndexer.h.
Referenced by finalize(), and processNewModule().
std::vector<uint32_t> HGCalMappingModuleIndexer::globalTypesNErx_ |
Definition at line 204 of file HGCalMappingModuleIndexer.h.
Referenced by finalize(), and processNewModule().
std::vector<uint32_t> HGCalMappingModuleIndexer::globalTypesNWords_ |
base offsets to apply per module type with different granularity : module, e-Rx, channel data
Definition at line 204 of file HGCalMappingModuleIndexer.h.
Referenced by finalize(), and processNewModule().
|
static |
max number of ECON-Ds processed by a main buffer/capture block
Definition at line 211 of file HGCalMappingModuleIndexer.h.
Referenced by HGCalMappingModuleIndexer().
uint32_t HGCalMappingModuleIndexer::maxDataIdx_ |
Definition at line 208 of file HGCalMappingModuleIndexer.h.
Referenced by finalize().
|
static |
Definition at line 213 of file HGCalMappingModuleIndexer.h.
Referenced by HGCalMappingModuleIndexer().
uint32_t HGCalMappingModuleIndexer::maxErxIdx_ |
Definition at line 208 of file HGCalMappingModuleIndexer.h.
Referenced by finalize().
uint32_t HGCalMappingModuleIndexer::maxModulesIdx_ |
max number of main buffers/capture blocks per FED
Definition at line 208 of file HGCalMappingModuleIndexer.h.
Referenced by finalize().
HGCalDenseIndexerBase HGCalMappingModuleIndexer::modFedIndexer_ |
the sequence of FED readout sequence descriptors
Definition at line 200 of file HGCalMappingModuleIndexer.h.
Referenced by denseIndexingFor(), and processNewModule().
std::vector<uint32_t> HGCalMappingModuleIndexer::moduleOffsets_ |
Definition at line 206 of file HGCalMappingModuleIndexer.h.
Referenced by finalize().
uint32_t HGCalMappingModuleIndexer::nfeds_ |
Definition at line 208 of file HGCalMappingModuleIndexer.h.
Referenced by denseIndexingFor(), and finalize().