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

#include <CbmDeviceMcbmUnpack.h>

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

Public Member Functions

 CbmDeviceMcbmUnpack ()
 
virtual ~CbmDeviceMcbmUnpack ()
 

Protected Member Functions

virtual void InitTask ()
 
bool HandleData (FairMQMessagePtr &, int)
 
bool HandleCommand (FairMQMessagePtr &, int)
 

Private Member Functions

Bool_t InitParameters (TList *fParCList)
 Parameters management.
 
bool IsChannelNameAllowed (std::string channelName)
 
Bool_t InitContainers ()
 
Bool_t DoUnpack (const fles::Timeslice &ts, size_t component)
 
void Finish ()
 
bool SendUnpData ()
 

Private Attributes

Bool_t fbIgnoreOverlapMs = false
 Control flags.
 
Bool_t fbComponentsAddedToList = kFALSE
 Ignore Overlap Ms: all fuOverlapMsNb MS at the end of timeslice.
 
std::string fsChannelNameDataInput = "fullts"
 User settings parameters.
 
std::string fsChannelNameDataOutput = "unpts_0"
 
std::string fsChannelNameCommands = "commands"
 
UInt_t fuDigiMaskedIdBmon = 0x00005006
 
UInt_t fuDigiMaskId = 0x0001FFFF
 
std::vector< std::string > fsAllowedChannels = {fsChannelNameDataInput}
 List of MQ channels names.
 
uint64_t fulNumMessages = 0
 Statistics & first TS rejection.
 
uint64_t fulTsCounter = 0
 
CbmMcbm2018UnpackerAlgoStsfUnpAlgoSts = nullptr
 Processing algos.
 
CbmMcbm2018UnpackerAlgoMuchfUnpAlgoMuch = nullptr
 
CbmMcbm2018UnpackerAlgoTrdRfUnpAlgoTrd = nullptr
 
CbmMcbm2018UnpackerAlgoToffUnpAlgoTof = nullptr
 
CbmMcbm2018UnpackerAlgoRichfUnpAlgoRich = nullptr
 
CbmMcbm2018UnpackerAlgoPsdfUnpAlgoPsd = nullptr
 
std::vector< std::string > fvsSetTimeOffs = {}
 Time offsets.
 
size_t fuNbCoreMsPerTs = 0
 TS MetaData storage.
 
size_t fuNbOverMsPerTs = 0
 
Double_t fdMsSizeInNs = 1280000
 
Double_t fdTsCoreSizeInNs = -1.0
 Size of a single MS, [nanoseconds].
 
Double_t fdTsOverSizeInNs = -1.0
 Total size of the core MS in a TS, [nanoseconds].
 
Double_t fdTsFullSizeInNs = -1.0
 Total size of the overlap MS in a TS, [nanoseconds].
 
TimesliceMetaDatafTsMetaData
 Total size of all MS in a TS, [nanoseconds].
 

Static Private Attributes

static const uint16_t kusSysIdSts = 0x10
 Constants.
 
static const uint16_t kusSysIdMuch = 0x50
 
static const uint16_t kusSysIdTrd = 0x40
 
static const uint16_t kusSysIdTof = 0x60
 
static const uint16_t kusSysIdBmon = 0x90
 
static const uint16_t kusSysIdRich = 0x30
 
static const uint16_t kusSysIdPsd = 0x80
 

Detailed Description

Definition at line 36 of file CbmDeviceMcbmUnpack.h.

Constructor & Destructor Documentation

◆ CbmDeviceMcbmUnpack()

CbmDeviceMcbmUnpack::CbmDeviceMcbmUnpack ( )

◆ ~CbmDeviceMcbmUnpack()

CbmDeviceMcbmUnpack::~CbmDeviceMcbmUnpack ( )
virtual

Member Function Documentation

◆ DoUnpack()

◆ Finish()

void CbmDeviceMcbmUnpack::Finish ( )
private

Definition at line 513 of file CbmDeviceMcbmUnpack.cxx.

◆ HandleCommand()

bool CbmDeviceMcbmUnpack::HandleCommand ( FairMQMessagePtr & ,
int  )
protected

◆ HandleData()

bool CbmDeviceMcbmUnpack::HandleData ( FairMQMessagePtr & msg,
int  )
protected

Create an empty TS and fill it with the incoming message

On first TS, extract the TS parameters from header (by definition stable over time)

Process the Timeslice

Send digi vectors to ouput

Clear the digis vectors in case it was filled

Clear the digis vectors in case it was filled

Definition at line 241 of file CbmDeviceMcbmUnpack.cxx.

References CbmStar2019Algo< T >::ClearErrorVector(), CbmStar2019Algo< T >::ClearVector(), DoUnpack(), fdMsSizeInNs, fdTsCoreSizeInNs, fdTsFullSizeInNs, fdTsOverSizeInNs, fTsMetaData, fulNumMessages, fuNbCoreMsPerTs, fuNbOverMsPerTs, fUnpAlgoMuch, fUnpAlgoPsd, fUnpAlgoRich, fUnpAlgoSts, fUnpAlgoTof, fUnpAlgoTrd, and SendUnpData().

Referenced by InitTask().

◆ InitContainers()

Bool_t CbmDeviceMcbmUnpack::InitContainers ( )
private

Need to add accessors for all options

Load time offsets

Detector Enum Tag

Min number

Starting from first run on Tuesday 28/04/2020, STS uses bin sorter FW

Starting from first run on Monday 04/05/2020, MUCH uses bin sorter FW

Special case for TRD vector initialization Get address of vector from algo in a kind of loopback ^^'

Definition at line 120 of file CbmDeviceMcbmUnpack.cxx.

References fbIgnoreOverlapMs, fUnpAlgoMuch, fUnpAlgoPsd, fUnpAlgoRich, fUnpAlgoSts, fUnpAlgoTof, fUnpAlgoTrd, fvsSetTimeOffs, CbmMcbm2018UnpackerAlgoMuch::GetParList(), CbmMcbm2018UnpackerAlgoPsd::GetParList(), CbmMcbm2018UnpackerAlgoRich::GetParList(), CbmMcbm2018UnpackerAlgoSts::GetParList(), CbmMcbm2018UnpackerAlgoTof::GetParList(), CbmMcbm2018UnpackerAlgoTrdR::GetParList(), CbmStar2019Algo< T >::GetVector(), CbmMcbm2018UnpackerAlgoMuch::InitContainers(), CbmMcbm2018UnpackerAlgoPsd::InitContainers(), CbmMcbm2018UnpackerAlgoRich::InitContainers(), CbmMcbm2018UnpackerAlgoSts::InitContainers(), CbmMcbm2018UnpackerAlgoTof::InitContainers(), CbmMcbm2018UnpackerAlgoTrdR::InitContainers(), InitParameters(), CbmMcbm2018UnpackerAlgoMuch::SetBinningFwFlag(), CbmMcbm2018UnpackerAlgoSts::SetBinningFwFlag(), CbmMcbm2018UnpackerAlgoTrdR::SetDigiOutputPointer(), CbmStar2019Algo< T >::SetIgnoreOverlapMs(), CbmMcbm2018UnpackerAlgoMuch::SetTimeOffsetNs(), CbmMcbm2018UnpackerAlgoPsd::SetTimeOffsetNs(), CbmMcbm2018UnpackerAlgoRich::SetTimeOffsetNs(), CbmMcbm2018UnpackerAlgoSts::SetTimeOffsetNs(), CbmMcbm2018UnpackerAlgoTof::SetTimeOffsetNs(), and CbmMcbm2018UnpackerAlgoTrdR::SetTimeOffsetNs().

Referenced by InitTask().

◆ InitParameters()

Bool_t CbmDeviceMcbmUnpack::InitParameters ( TList * fParCList)
private

Parameters management.

Definition at line 201 of file CbmDeviceMcbmUnpack.cxx.

Referenced by InitContainers().

◆ InitTask()

void CbmDeviceMcbmUnpack::InitTask ( )
protectedvirtual

Read options from executable

TODO: option to set fuDigiMaskedIdBmon !!!!

Definition at line 64 of file CbmDeviceMcbmUnpack.cxx.

References fbIgnoreOverlapMs, fsAllowedChannels, fsChannelNameDataInput, fsChannelNameDataOutput, fvsSetTimeOffs, HandleData(), InitContainers(), and IsChannelNameAllowed().

◆ IsChannelNameAllowed()

bool CbmDeviceMcbmUnpack::IsChannelNameAllowed ( std::string channelName)
private

Definition at line 102 of file CbmDeviceMcbmUnpack.cxx.

References fsAllowedChannels, and pos.

Referenced by InitTask().

◆ SendUnpData()

bool CbmDeviceMcbmUnpack::SendUnpData ( )
private

Prepare serialized versions of the TS Meta

Split TOF vector in TOF and Bmon

Insert data in Bmon output container

Insert data in TOF output container

Definition at line 297 of file CbmDeviceMcbmUnpack.cxx.

References fsChannelNameDataOutput, fTsMetaData, fuDigiMaskedIdBmon, fuDigiMaskId, fUnpAlgoMuch, fUnpAlgoPsd, fUnpAlgoRich, fUnpAlgoSts, fUnpAlgoTof, fUnpAlgoTrd, and CbmStar2019Algo< T >::GetVector().

Referenced by HandleData().

Member Data Documentation

◆ fbComponentsAddedToList

Bool_t CbmDeviceMcbmUnpack::fbComponentsAddedToList = kFALSE
private

Ignore Overlap Ms: all fuOverlapMsNb MS at the end of timeslice.

Definition at line 58 of file CbmDeviceMcbmUnpack.h.

Referenced by DoUnpack().

◆ fbIgnoreOverlapMs

Bool_t CbmDeviceMcbmUnpack::fbIgnoreOverlapMs = false
private

Control flags.

Definition at line 57 of file CbmDeviceMcbmUnpack.h.

Referenced by InitContainers(), and InitTask().

◆ fdMsSizeInNs

Double_t CbmDeviceMcbmUnpack::fdMsSizeInNs = 1280000
private

Definition at line 92 of file CbmDeviceMcbmUnpack.h.

Referenced by HandleData().

◆ fdTsCoreSizeInNs

Double_t CbmDeviceMcbmUnpack::fdTsCoreSizeInNs = -1.0
private

Size of a single MS, [nanoseconds].

Definition at line 93 of file CbmDeviceMcbmUnpack.h.

Referenced by HandleData().

◆ fdTsFullSizeInNs

Double_t CbmDeviceMcbmUnpack::fdTsFullSizeInNs = -1.0
private

Total size of the overlap MS in a TS, [nanoseconds].

Definition at line 95 of file CbmDeviceMcbmUnpack.h.

Referenced by HandleData().

◆ fdTsOverSizeInNs

Double_t CbmDeviceMcbmUnpack::fdTsOverSizeInNs = -1.0
private

Total size of the core MS in a TS, [nanoseconds].

Definition at line 94 of file CbmDeviceMcbmUnpack.h.

Referenced by HandleData().

◆ fsAllowedChannels

std::vector<std::string> CbmDeviceMcbmUnpack::fsAllowedChannels = {fsChannelNameDataInput}
private

List of MQ channels names.

Definition at line 68 of file CbmDeviceMcbmUnpack.h.

Referenced by InitTask(), and IsChannelNameAllowed().

◆ fsChannelNameCommands

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

Definition at line 63 of file CbmDeviceMcbmUnpack.h.

◆ fsChannelNameDataInput

std::string CbmDeviceMcbmUnpack::fsChannelNameDataInput = "fullts"
private

User settings parameters.

Definition at line 61 of file CbmDeviceMcbmUnpack.h.

Referenced by InitTask().

◆ fsChannelNameDataOutput

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

Definition at line 62 of file CbmDeviceMcbmUnpack.h.

Referenced by InitTask(), and SendUnpData().

◆ fTsMetaData

TimesliceMetaData* CbmDeviceMcbmUnpack::fTsMetaData
private

Total size of all MS in a TS, [nanoseconds].

Definition at line 96 of file CbmDeviceMcbmUnpack.h.

Referenced by HandleData(), and SendUnpData().

◆ fuDigiMaskedIdBmon

UInt_t CbmDeviceMcbmUnpack::fuDigiMaskedIdBmon = 0x00005006
private

Definition at line 64 of file CbmDeviceMcbmUnpack.h.

Referenced by SendUnpData().

◆ fuDigiMaskId

UInt_t CbmDeviceMcbmUnpack::fuDigiMaskId = 0x0001FFFF
private

Definition at line 65 of file CbmDeviceMcbmUnpack.h.

Referenced by SendUnpData().

◆ fulNumMessages

uint64_t CbmDeviceMcbmUnpack::fulNumMessages = 0
private

Statistics & first TS rejection.

Definition at line 75 of file CbmDeviceMcbmUnpack.h.

Referenced by HandleData().

◆ fulTsCounter

uint64_t CbmDeviceMcbmUnpack::fulTsCounter = 0
private

Definition at line 76 of file CbmDeviceMcbmUnpack.h.

Referenced by DoUnpack().

◆ fuNbCoreMsPerTs

size_t CbmDeviceMcbmUnpack::fuNbCoreMsPerTs = 0
private

TS MetaData storage.

Definition at line 90 of file CbmDeviceMcbmUnpack.h.

Referenced by HandleData().

◆ fuNbOverMsPerTs

size_t CbmDeviceMcbmUnpack::fuNbOverMsPerTs = 0
private

Definition at line 91 of file CbmDeviceMcbmUnpack.h.

Referenced by HandleData().

◆ fUnpAlgoMuch

CbmMcbm2018UnpackerAlgoMuch* CbmDeviceMcbmUnpack::fUnpAlgoMuch = nullptr
private

◆ fUnpAlgoPsd

CbmMcbm2018UnpackerAlgoPsd* CbmDeviceMcbmUnpack::fUnpAlgoPsd = nullptr
private

◆ fUnpAlgoRich

CbmMcbm2018UnpackerAlgoRich* CbmDeviceMcbmUnpack::fUnpAlgoRich = nullptr
private

◆ fUnpAlgoSts

CbmMcbm2018UnpackerAlgoSts* CbmDeviceMcbmUnpack::fUnpAlgoSts = nullptr
private

Processing algos.

Definition at line 79 of file CbmDeviceMcbmUnpack.h.

Referenced by CbmDeviceMcbmUnpack(), DoUnpack(), HandleData(), InitContainers(), SendUnpData(), and ~CbmDeviceMcbmUnpack().

◆ fUnpAlgoTof

CbmMcbm2018UnpackerAlgoTof* CbmDeviceMcbmUnpack::fUnpAlgoTof = nullptr
private

◆ fUnpAlgoTrd

CbmMcbm2018UnpackerAlgoTrdR* CbmDeviceMcbmUnpack::fUnpAlgoTrd = nullptr
private

◆ fvsSetTimeOffs

std::vector<std::string> CbmDeviceMcbmUnpack::fvsSetTimeOffs = {}
private

Time offsets.

Definition at line 87 of file CbmDeviceMcbmUnpack.h.

Referenced by InitContainers(), and InitTask().

◆ kusSysIdBmon

const uint16_t CbmDeviceMcbmUnpack::kusSysIdBmon = 0x90
staticprivate

Definition at line 52 of file CbmDeviceMcbmUnpack.h.

Referenced by DoUnpack().

◆ kusSysIdMuch

const uint16_t CbmDeviceMcbmUnpack::kusSysIdMuch = 0x50
staticprivate

Definition at line 49 of file CbmDeviceMcbmUnpack.h.

Referenced by DoUnpack().

◆ kusSysIdPsd

const uint16_t CbmDeviceMcbmUnpack::kusSysIdPsd = 0x80
staticprivate

Definition at line 54 of file CbmDeviceMcbmUnpack.h.

Referenced by DoUnpack().

◆ kusSysIdRich

const uint16_t CbmDeviceMcbmUnpack::kusSysIdRich = 0x30
staticprivate

Definition at line 53 of file CbmDeviceMcbmUnpack.h.

Referenced by DoUnpack().

◆ kusSysIdSts

const uint16_t CbmDeviceMcbmUnpack::kusSysIdSts = 0x10
staticprivate

Constants.

Definition at line 48 of file CbmDeviceMcbmUnpack.h.

Referenced by DoUnpack().

◆ kusSysIdTof

const uint16_t CbmDeviceMcbmUnpack::kusSysIdTof = 0x60
staticprivate

Definition at line 51 of file CbmDeviceMcbmUnpack.h.

Referenced by DoUnpack().

◆ kusSysIdTrd

const uint16_t CbmDeviceMcbmUnpack::kusSysIdTrd = 0x40
staticprivate

Definition at line 50 of file CbmDeviceMcbmUnpack.h.

Referenced by DoUnpack().


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