CbmRoot
|
Provides the hardware-to-software address mapping for the CBM-TRD2D. More...
#include <ReadoutConfig.h>
Classes | |
struct | ChanMapping |
struct | CompMapping |
Public Member Functions | |
ReadoutConfig () | |
Constructor. | |
~ReadoutConfig () | |
Destructor. | |
std::vector< uint16_t > | GetEquipmentIds () |
Equipment in the configuration. | |
size_t | GetNumAsics (uint16_t equipmentId) |
Number of ASICS of a component. | |
size_t | GetNumChans (uint16_t equipmentId, uint16_t asicId) |
Number of channels of a component - ASIC pair. | |
CompMapping | CompMap (uint16_t equipId) |
API: Mapping from component to pair (module id, crob id) | |
ChanMapping | ChanMap (uint16_t equipId, uint16_t asic, uint16_t chan) |
API: Mapping from component, asic and channel to tuple (pad address, R pairing flag, daq offset) | |
std::string | PrintReadoutMap () |
Debug output of readout map. | |
void | InitComponentMap (const std::map< uint32_t, uint16_t[NCROBMOD]> &crob_map) |
Initialisation of readout map. | |
void | InitChannelMap (const std::map< size_t, std::map< size_t, std::map< size_t, std::tuple< int32_t, bool, uint64_t > > > > &channelMap) |
Initialisation of channel map. | |
int64_t | GetSystemTimeOffset () |
Get system time offset. | |
void | SetSystemTimeOffset (int64_t offsetNs) |
Get system time offset. | |
Private Member Functions | |
CBM_YAML_PROPERTIES (yaml::Property(&ReadoutConfig::fSystemTimeOffset, "timeOffset", "System time offset for TRD2D"), yaml::Property(&ReadoutConfig::fReadoutMap, "readoutMap", "Maps equipment to module and CROB ID", YAML::Hex), yaml::Property(&ReadoutConfig::fChannelMap, "channelMap", "Maps equipment, ASIC and channel to pad address, R pairing flag and DAQ offset", {}, YAML::Hex)) | |
Private Attributes | |
int64_t | fSystemTimeOffset = 0 |
std::map< uint16_t, CompMapping > | fReadoutMap = {} |
std::map< uint16_t, std::vector< std::vector< ChanMapping > > > | fChannelMap = {} |
Provides the hardware-to-software address mapping for the CBM-TRD2D.
The hardware address as provided in the raw data stream is specified in terms of the equipment identifier (specific to one FLES component) and the elink number with in component. This is to be translated into the module address and the ASIC number within the module. The mapping of the two address spaces is hard-coded in this class.
Definition at line 32 of file trd2d/ReadoutConfig.h.
cbm::algo::trd2d::ReadoutConfig::ReadoutConfig | ( | ) |
Constructor.
Definition at line 23 of file trd2d/ReadoutConfig.cxx.
cbm::algo::trd2d::ReadoutConfig::~ReadoutConfig | ( | ) |
Destructor.
Definition at line 29 of file trd2d/ReadoutConfig.cxx.
|
private |
ReadoutConfig::ChanMapping cbm::algo::trd2d::ReadoutConfig::ChanMap | ( | uint16_t | equipId, |
uint16_t | asic, | ||
uint16_t | chan ) |
API: Mapping from component, asic and channel to tuple (pad address, R pairing flag, daq offset)
equipId | Equipment identifier (component) |
asic | ASIC number within component |
channel | Channel number within CROB |
Definition at line 112 of file trd2d/ReadoutConfig.cxx.
References fChannelMap, and size().
Referenced by cbm::algo::trd2d::Unpack::Unpack().
ReadoutConfig::CompMapping cbm::algo::trd2d::ReadoutConfig::CompMap | ( | uint16_t | equipId | ) |
API: Mapping from component to pair (module id, crob id)
equipId | Equipment identifier (component) |
Definition at line 129 of file trd2d/ReadoutConfig.cxx.
References fReadoutMap.
Referenced by cbm::algo::trd2d::Unpack::Unpack().
std::vector< uint16_t > cbm::algo::trd2d::ReadoutConfig::GetEquipmentIds | ( | ) |
Equipment in the configuration.
Definition at line 34 of file trd2d/ReadoutConfig.cxx.
References fReadoutMap.
Referenced by cbm::algo::trd2d::Unpack::Unpack().
size_t cbm::algo::trd2d::ReadoutConfig::GetNumAsics | ( | uint16_t | equipmentId | ) |
Number of ASICS of a component.
Equipment | ID |
Definition at line 45 of file trd2d/ReadoutConfig.cxx.
References fChannelMap.
Referenced by cbm::algo::trd2d::Unpack::Unpack().
size_t cbm::algo::trd2d::ReadoutConfig::GetNumChans | ( | uint16_t | equipmentId, |
uint16_t | asicId ) |
Number of channels of a component - ASIC pair.
Equipment | ID |
ASIC | ID |
Definition at line 56 of file trd2d/ReadoutConfig.cxx.
References fChannelMap, and size().
Referenced by cbm::algo::trd2d::Unpack::Unpack().
|
inline |
Get system time offset.
Definition at line 112 of file trd2d/ReadoutConfig.h.
References fSystemTimeOffset.
Referenced by cbm::algo::trd2d::Unpack::Unpack().
void cbm::algo::trd2d::ReadoutConfig::InitChannelMap | ( | const std::map< size_t, std::map< size_t, std::map< size_t, std::tuple< int32_t, bool, uint64_t > > > > & | channelMap | ) |
Initialisation of channel map.
Definition at line 86 of file trd2d/ReadoutConfig.cxx.
References fChannelMap.
Referenced by CbmTaskTrdUnpackParWrite::Init().
void cbm::algo::trd2d::ReadoutConfig::InitComponentMap | ( | const std::map< uint32_t, uint16_t[NCROBMOD]> & | crob_map | ) |
Initialisation of readout map.
Definition at line 70 of file trd2d/ReadoutConfig.cxx.
References fReadoutMap, and NCROBMOD.
Referenced by CbmTaskTrdUnpackParWrite::Init().
std::string cbm::algo::trd2d::ReadoutConfig::PrintReadoutMap | ( | ) |
Debug output of readout map.
Definition at line 142 of file trd2d/ReadoutConfig.cxx.
References fChannelMap, and fReadoutMap.
|
inline |
Get system time offset.
Definition at line 115 of file trd2d/ReadoutConfig.h.
References fSystemTimeOffset.
Referenced by CbmTaskTrdUnpackParWrite::Init().
|
private |
Definition at line 127 of file trd2d/ReadoutConfig.h.
Referenced by ChanMap(), GetNumAsics(), GetNumChans(), InitChannelMap(), and PrintReadoutMap().
|
private |
Definition at line 123 of file trd2d/ReadoutConfig.h.
Referenced by CompMap(), GetEquipmentIds(), InitComponentMap(), and PrintReadoutMap().
|
private |
Definition at line 119 of file trd2d/ReadoutConfig.h.
Referenced by GetSystemTimeOffset(), and SetSystemTimeOffset().