CbmRoot
Loading...
Searching...
No Matches
cbm::algo::trd2d::ReadoutConfig Class Reference

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, CompMappingfReadoutMap = {}
 
std::map< uint16_t, std::vector< std::vector< ChanMapping > > > fChannelMap = {}
 

Detailed Description

Provides the hardware-to-software address mapping for the CBM-TRD2D.

Author
Volker Friese v.fri.nosp@m.ese@.nosp@m.gsi.d.nosp@m.e
Since
3 March 2022

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.

Constructor & Destructor Documentation

◆ ReadoutConfig()

cbm::algo::trd2d::ReadoutConfig::ReadoutConfig ( )

Constructor.

Definition at line 23 of file trd2d/ReadoutConfig.cxx.

◆ ~ReadoutConfig()

cbm::algo::trd2d::ReadoutConfig::~ReadoutConfig ( )

Destructor.

Definition at line 29 of file trd2d/ReadoutConfig.cxx.

Member Function Documentation

◆ CBM_YAML_PROPERTIES()

cbm::algo::trd2d::ReadoutConfig::CBM_YAML_PROPERTIES ( yaml::Property &::, "", " " TRD2D,
yaml::Property &::, "", " ", ::Hex ,
yaml::Property &::, "", " , , ", {}, ::Hex  )
private

◆ ChanMap()

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)

Parameters
equipIdEquipment identifier (component)
asicASIC number within component
channelChannel number within CROB
Returns
tuple (pad address, R pairing flag, daq offset)

Definition at line 112 of file trd2d/ReadoutConfig.cxx.

References fChannelMap, and size().

Referenced by cbm::algo::trd2d::Unpack::Unpack().

◆ CompMap()

ReadoutConfig::CompMapping cbm::algo::trd2d::ReadoutConfig::CompMap ( uint16_t equipId)

API: Mapping from component to pair (module id, crob id)

Parameters
equipIdEquipment identifier (component)
Returns
pair (module id, crob id)

Definition at line 129 of file trd2d/ReadoutConfig.cxx.

References fReadoutMap.

Referenced by cbm::algo::trd2d::Unpack::Unpack().

◆ GetEquipmentIds()

std::vector< uint16_t > cbm::algo::trd2d::ReadoutConfig::GetEquipmentIds ( )

Equipment in the configuration.

Returns
Vector of equipment IDs

Definition at line 34 of file trd2d/ReadoutConfig.cxx.

References fReadoutMap.

Referenced by cbm::algo::trd2d::Unpack::Unpack().

◆ GetNumAsics()

size_t cbm::algo::trd2d::ReadoutConfig::GetNumAsics ( uint16_t equipmentId)

Number of ASICS of a component.

Parameters
EquipmentID
Returns
Number of ASICS

Definition at line 45 of file trd2d/ReadoutConfig.cxx.

References fChannelMap.

Referenced by cbm::algo::trd2d::Unpack::Unpack().

◆ GetNumChans()

size_t cbm::algo::trd2d::ReadoutConfig::GetNumChans ( uint16_t equipmentId,
uint16_t asicId )

Number of channels of a component - ASIC pair.

Parameters
EquipmentID
ASICID
Returns
Number of channels

Definition at line 56 of file trd2d/ReadoutConfig.cxx.

References fChannelMap, and size().

Referenced by cbm::algo::trd2d::Unpack::Unpack().

◆ GetSystemTimeOffset()

int64_t cbm::algo::trd2d::ReadoutConfig::GetSystemTimeOffset ( )
inline

Get system time offset.

Definition at line 112 of file trd2d/ReadoutConfig.h.

References fSystemTimeOffset.

Referenced by cbm::algo::trd2d::Unpack::Unpack().

◆ InitChannelMap()

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().

◆ InitComponentMap()

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().

◆ PrintReadoutMap()

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.

◆ SetSystemTimeOffset()

void cbm::algo::trd2d::ReadoutConfig::SetSystemTimeOffset ( int64_t offsetNs)
inline

Get system time offset.

Definition at line 115 of file trd2d/ReadoutConfig.h.

References fSystemTimeOffset.

Referenced by CbmTaskTrdUnpackParWrite::Init().

Member Data Documentation

◆ fChannelMap

std::map<uint16_t, std::vector<std::vector<ChanMapping> > > cbm::algo::trd2d::ReadoutConfig::fChannelMap = {}
private

◆ fReadoutMap

std::map<uint16_t, CompMapping> cbm::algo::trd2d::ReadoutConfig::fReadoutMap = {}
private

Definition at line 123 of file trd2d/ReadoutConfig.h.

Referenced by CompMap(), GetEquipmentIds(), InitComponentMap(), and PrintReadoutMap().

◆ fSystemTimeOffset

int64_t cbm::algo::trd2d::ReadoutConfig::fSystemTimeOffset = 0
private

Definition at line 119 of file trd2d/ReadoutConfig.h.

Referenced by GetSystemTimeOffset(), and SetSystemTimeOffset().


The documentation for this class was generated from the following files: