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

#include <ReadoutConfig.h>

Classes

struct  ChanMapping
 
struct  CompMapping
 

Public Member Functions

 ReadoutSetup ()
 Constructor.
 
 ~ReadoutSetup ()
 Destructor.
 
std::vector< uint16_t > GetEquipmentIds ()
 Equipment in the configuration.
 
size_t GetNumAsics (uint16_t equipmentId)
 Number of ASICS of a component.
 
std::vector< uint8_t > GetAsicList (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, std::vector< uint16_t > > &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, int16_t, uint16_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(&ReadoutSetup::fSystemTimeOffset, "timeOffset", "System time offset for TRD2D"), yaml::Property(&ReadoutSetup::fReadoutMap, "readoutMap", "Maps equipment to module and Optical fibre Id", YAML::Hex), yaml::Property(&ReadoutSetup::fChannelMap, "channelMap", "Maps equipment, ASIC and channel to pad address, mask flag and DAQ offset", YAML::Hex))
 

Private Attributes

int64_t fSystemTimeOffset = 0
 
std::map< uint16_t, CompMappingfReadoutMap = {}
 
std::map< uint16_t, std::map< uint8_t, std::vector< ChanMapping > > > fChannelMap = {}
 

Detailed Description

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

Constructor & Destructor Documentation

◆ ReadoutSetup()

cbm::algo::trd2d::ReadoutSetup::ReadoutSetup ( )

Constructor.

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

◆ ~ReadoutSetup()

cbm::algo::trd2d::ReadoutSetup::~ReadoutSetup ( )

Destructor.

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

Member Function Documentation

◆ CBM_YAML_PROPERTIES()

cbm::algo::trd2d::ReadoutSetup::CBM_YAML_PROPERTIES ( yaml::Property &::, "", " " TRD2D,
yaml::Property &::, "", " ", ::Hex ,
yaml::Property &::, "", " , , ", ::Hex  )
private

◆ ChanMap()

ReadoutSetup::ChanMapping cbm::algo::trd2d::ReadoutSetup::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 147 of file trd2d/ReadoutConfig.cxx.

References fChannelMap.

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

◆ CompMap()

ReadoutSetup::CompMapping cbm::algo::trd2d::ReadoutSetup::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 167 of file trd2d/ReadoutConfig.cxx.

References fReadoutMap.

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

◆ GetAsicList()

std::vector< uint8_t > cbm::algo::trd2d::ReadoutSetup::GetAsicList ( uint16_t equipmentId)

Number of ASICS of a component.

Parameters
EquipmentID
Returns
List of ASICS linked to the curent ROB

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

References fChannelMap.

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

◆ GetEquipmentIds()

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

Equipment in the configuration.

Returns
Vector of equipment IDs

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

References fReadoutMap.

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

◆ GetNumAsics()

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

Number of ASICS of a component.

Parameters
EquipmentID
Returns
Number of ASICS

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

References fChannelMap.

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

◆ GetNumChans()

size_t cbm::algo::trd2d::ReadoutSetup::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 88 of file trd2d/ReadoutConfig.cxx.

References fChannelMap.

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

◆ GetSystemTimeOffset()

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

Get system time offset.

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

References fSystemTimeOffset.

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

◆ InitChannelMap()

void cbm::algo::trd2d::ReadoutSetup::InitChannelMap ( const std::map< size_t, std::map< size_t, std::map< size_t, std::tuple< int32_t, bool, int16_t, uint16_t > > > > & channelMap)

Initialisation of channel map.

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

References fChannelMap.

Referenced by CbmTaskTrdUnpackParWrite::Init().

◆ InitComponentMap()

void cbm::algo::trd2d::ReadoutSetup::InitComponentMap ( const std::map< uint32_t, std::vector< uint16_t > > & map)

Initialisation of readout map.

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

References fReadoutMap.

Referenced by CbmTaskTrdUnpackParWrite::Init().

◆ PrintReadoutMap()

std::string cbm::algo::trd2d::ReadoutSetup::PrintReadoutMap ( )

Debug output of readout map.

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

References fChannelMap, and fReadoutMap.

◆ SetSystemTimeOffset()

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

Get system time offset.

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

References fSystemTimeOffset.

Referenced by CbmTaskTrdUnpackParWrite::Init().

Member Data Documentation

◆ fChannelMap

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

◆ fReadoutMap

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

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

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

◆ fSystemTimeOffset

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

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

Referenced by GetSystemTimeOffset(), and SetSystemTimeOffset().


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