CbmRoot
Loading...
Searching...
No Matches
CbmDevUnpack Class Reference

#include <CbmDevUnpack.h>

Inheritance diagram for CbmDevUnpack:
[legend]
Collaboration diagram for CbmDevUnpack:
[legend]

Public Member Functions

 CbmDevUnpack ()
 
virtual ~CbmDevUnpack ()
 

Private Member Functions

virtual void InitTask ()
 Read command line parameters for MQ device.
 
bool ConditionalRun ()
 Called by run loop, does init steps on first TS.
 
bool InitAlgos ()
 Initialize runtime parameters for UnpackSts algos.
 
CbmDigiTimeslice DoUnpack (const fles::Timeslice &ts)
 Unpack a single timeslice.
 
bool SendData (const CbmDigiTimeslice &timeslice, const TimesliceMetaData &TsMetaData)
 Serialize unpacked digi timeslice and send to output channel.
 

Private Attributes

std::map< uint16_t, cbm::algo::UnpackStsfAlgoSts = {}
 
cbm::algo::StsReadoutConfigLegacy fStsConfig {}
 
std::map< uint16_t, cbm::algo::UnpackMuchfAlgoMuch = {}
 
cbm::algo::MuchReadoutConfig fMuchConfig {}
 
std::string fsChannelNameDataInput = "ts-request"
 message queues
 
std::string fsChannelNameDataOutput = "unpts_0"
 
std::string fsChannelNameCommands = "commands"
 
size_t fNumMessages = 0
 Statistics & first TS rejection.
 
size_t fNumTs = 0
 

Detailed Description

Definition at line 33 of file CbmDevUnpack.h.

Constructor & Destructor Documentation

◆ CbmDevUnpack()

CbmDevUnpack::CbmDevUnpack ( )

Definition at line 43 of file CbmDevUnpack.cxx.

◆ ~CbmDevUnpack()

virtual CbmDevUnpack::~CbmDevUnpack ( )
inlinevirtual

Definition at line 36 of file CbmDevUnpack.h.

Member Function Documentation

◆ ConditionalRun()

bool CbmDevUnpack::ConditionalRun ( )
private

Called by run loop, does init steps on first TS.

First request a new TS (full one)

Message received, do Algo related Initialization steps if needed

Create an empty TS and fill it with the incoming message

Extract the TS parameters from header (by definition stable over time)

Process the timeslice

Send digi vectors to ouput

Definition at line 115 of file CbmDevUnpack.cxx.

References DoUnpack(), fNumMessages, fNumTs, fsChannelNameDataInput, InitAlgos(), and SendData().

◆ DoUnpack()

CbmDigiTimeslice CbmDevUnpack::DoUnpack ( const fles::Timeslice & ts)
private

Unpack a single timeslice.

Parameters
tsInput FLES timeslice

Definition at line 212 of file CbmDevUnpack.cxx.

References fAlgoMuch, fAlgoSts, CbmDigiTimeslice::fData, CbmMuchDigiData::fDigis, CbmStsDigiData::fDigis, CbmDigiData::fMuch, fNumTs, and CbmDigiData::fSts.

Referenced by ConditionalRun().

◆ InitAlgos()

Bool_t CbmDevUnpack::InitAlgos ( )
private

Initialize runtime parameters for UnpackSts algos.

Definition at line 58 of file CbmDevUnpack.cxx.

References fAlgoMuch, fAlgoSts, fMuchConfig, and fStsConfig.

Referenced by ConditionalRun().

◆ InitTask()

void CbmDevUnpack::InitTask ( )
privatevirtual

Read command line parameters for MQ device.

Read options from executable

Definition at line 45 of file CbmDevUnpack.cxx.

References fsChannelNameDataInput, and fsChannelNameDataOutput.

◆ SendData()

bool CbmDevUnpack::SendData ( const CbmDigiTimeslice & timeslice,
const TimesliceMetaData & TsMetaData )
private

Serialize unpacked digi timeslice and send to output channel.

Prepare serialized version of Digi Timeslice

Prepare serialized versions of the TS Meta FIXME: only for TS duration and overlap, should be sent to parameter service instead as stable values in run Index and start time are already included in the TsHeader object!

Definition at line 180 of file CbmDevUnpack.cxx.

References fsChannelNameDataOutput.

Referenced by ConditionalRun().

Member Data Documentation

◆ fAlgoMuch

std::map<uint16_t, cbm::algo::UnpackMuch> CbmDevUnpack::fAlgoMuch = {}
private

Definition at line 42 of file CbmDevUnpack.h.

Referenced by DoUnpack(), and InitAlgos().

◆ fAlgoSts

std::map<uint16_t, cbm::algo::UnpackSts> CbmDevUnpack::fAlgoSts = {}
private

Definition at line 39 of file CbmDevUnpack.h.

Referenced by DoUnpack(), and InitAlgos().

◆ fMuchConfig

cbm::algo::MuchReadoutConfig CbmDevUnpack::fMuchConfig {}
private

Definition at line 43 of file CbmDevUnpack.h.

Referenced by InitAlgos().

◆ fNumMessages

size_t CbmDevUnpack::fNumMessages = 0
private

Statistics & first TS rejection.

Definition at line 51 of file CbmDevUnpack.h.

Referenced by ConditionalRun().

◆ fNumTs

size_t CbmDevUnpack::fNumTs = 0
private

Definition at line 52 of file CbmDevUnpack.h.

Referenced by ConditionalRun(), and DoUnpack().

◆ fsChannelNameCommands

std::string CbmDevUnpack::fsChannelNameCommands = "commands"
private

Definition at line 48 of file CbmDevUnpack.h.

◆ fsChannelNameDataInput

std::string CbmDevUnpack::fsChannelNameDataInput = "ts-request"
private

message queues

Definition at line 46 of file CbmDevUnpack.h.

Referenced by ConditionalRun(), and InitTask().

◆ fsChannelNameDataOutput

std::string CbmDevUnpack::fsChannelNameDataOutput = "unpts_0"
private

Definition at line 47 of file CbmDevUnpack.h.

Referenced by InitTask(), and SendData().

◆ fStsConfig

cbm::algo::StsReadoutConfigLegacy CbmDevUnpack::fStsConfig {}
private

Definition at line 40 of file CbmDevUnpack.h.

Referenced by InitAlgos().


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