CbmRoot
|
#include <CbmMQTsaMultiSampler.h>
Public Member Functions | |
CbmMQTsaMultiSampler () | |
virtual | ~CbmMQTsaMultiSampler () |
Protected Member Functions | |
virtual void | InitTask () |
virtual bool | ConditionalRun () |
Protected Attributes | |
uint64_t | fMaxTimeslices |
std::string | fFileName |
std::string | fDirName |
std::vector< std::string > | fInputFileList |
List of input files. More... | |
uint64_t | fFileCounter |
std::string | fHost |
uint64_t | fPort |
uint64_t | fHighWaterMark |
bool | fbNoSplitTs = false |
bool | fbSendTsPerSysId = false |
bool | fbSendTsPerChannel = false |
uint64_t | fuPrevTsIndex = 0 |
uint64_t | fTSCounter |
uint64_t | fMessageCounter |
int | fMaxMemory = 0 |
Private Member Functions | |
bool | OpenNextFile () |
bool | CheckTimeslice (const fles::Timeslice &ts) |
void | PrintMicroSliceDescriptor (const fles::MicrosliceDescriptor &mdsc) |
bool | SendData (const fles::StorableTimeslice &component) |
void | CalcRuntime () |
bool | IsChannelNameAllowed (std::string) |
bool | CreateAndSendComponent (const fles::Timeslice &, int) |
bool | CreateAndCombineComponentsPerSysId (const fles::Timeslice &) |
bool | CreateAndCombineComponentsPerChannel (const fles::Timeslice &) |
bool | CreateAndSendFullTs (const fles::Timeslice &) |
bool | SendData (const fles::StorableTimeslice &, int) |
bool | SendData (const fles::StorableTimeslice &, std::string) |
bool | SendMissedTsIdx (std::vector< uint64_t > vIndices) |
bool | SendCommand (std::string sCommand) |
Private Attributes | |
fles::TimesliceSource * | fSource |
std::chrono::steady_clock::time_point | fTime |
std::vector< std::string > | fAllowedChannels |
std::vector< int > | fSysId = {0x10, 0x30, 0x40, 0x50, 0x60, 0x90} |
std::vector< int > | fComponentsToSend = {0, 0, 0, 0, 0, 0} |
std::vector< std::vector< std::string > > | fChannelsToSend |
bool | fbListCompPerSysIdReady = false |
std::vector< std::vector< uint32_t > > | fvvCompPerSysId = {{}, {}, {}, {}, {}, {}} |
bool | fbListCompPerChannelReady = false |
std::vector< std::string > | fvChannelsToSend = {} |
std::vector< std::vector< uint32_t > > | fvvCompPerChannel = {} |
std::string | fsChannelNameMissedTs = "" |
std::string | fsChannelNameCommands = "" |
CbmMQTsaMultiSampler::CbmMQTsaMultiSampler | ( | ) |
Definition at line 48 of file CbmMQTsaMultiSampler.cxx.
|
virtual |
Definition at line 916 of file CbmMQTsaMultiSampler.cxx.
|
private |
Definition at line 918 of file CbmMQTsaMultiSampler.cxx.
References fTime.
Referenced by ConditionalRun().
|
private |
Definition at line 945 of file CbmMQTsaMultiSampler.cxx.
|
protectedvirtual |
Missed TS detection (only if output channel name defined by user)
Add missing TS indices to a vector and send it in appropriate channel
If command channel defined, send command to all "slaves"
Wait 1 s before sending a STOP to let all slaves finish processing previous data
This is a special case for the TOF + T0 => Inefficient as copy the TS as many times as need!
If command channel defined, send command to all "slaves"
Wait 1 s before sending a STOP to let all slaves finish processing previous data
This assumes that the order of the components does NOT change after the first TS That should be the case as the component index correspond to a physical link idx
If command channel defined, send command to all "slaves"
Wait 1 s before sending a STOP to let all slaves finish processing previous data
This assumes that the order of the components does NOT change after the first TS That should be the case as the component index correspond to a physical link idx
If command channel defined, send command to all "slaves"
Wait 1 s before sending a STOP to let all slaves finish processing previous data
If command channel defined, send command to all "slaves"
Wait 1 s before sending a STOP to let all slaves finish processing previous data
If command channel defined, send command to all "slaves"
Wait 1 s before sending an EOF to let all slaves finish processing previous data
If command channel defined, send command to all "slaves"
Wait 1 s before sending an EOF to let all slaves finish processing previous data
Definition at line 375 of file CbmMQTsaMultiSampler.cxx.
References CalcRuntime(), CreateAndCombineComponentsPerChannel(), CreateAndCombineComponentsPerSysId(), CreateAndSendComponent(), CreateAndSendFullTs(), fbNoSplitTs, fbSendTsPerChannel, fbSendTsPerSysId, fMaxTimeslices, FormatDecPrintout(), fsChannelNameCommands, fsChannelNameMissedTs, fSource, fTSCounter, fuPrevTsIndex, SendCommand(), and SendMissedTsIdx().
|
private |
First build the list of components for each channel name if it was not already done
First add each channel enabled for sending to the list of channels we will use
Now resize the vector in which we will store fo each sending channel the list of components
Check for each component if its system is enabled and if the name of its channel(s) is in the list If yes, add it to the vector of the corresponding channel
Loop on channels Loop on possible SysId and check channels
Then loop on all possible channels and send TS with their respective components if needed
Definition at line 635 of file CbmMQTsaMultiSampler.cxx.
References fbListCompPerChannelReady, fChannelsToSend, fComponentsToSend, fSysId, fvChannelsToSend, fvvCompPerChannel, m, pos, and SendData().
Referenced by ConditionalRun().
|
private |
First build the list of components for each SysId if it was not already done
Then loop on all possible SysId and send TS with their respective components if needed
Definition at line 561 of file CbmMQTsaMultiSampler.cxx.
References fbListCompPerSysIdReady, fComponentsToSend, fSysId, fvvCompPerSysId, m, pos, and SendData().
Referenced by ConditionalRun().
|
private |
Definition at line 524 of file CbmMQTsaMultiSampler.cxx.
References fComponentsToSend, fSysId, m, pos, and SendData().
Referenced by ConditionalRun().
|
private |
Send full TS to all enabled channels
Definition at line 749 of file CbmMQTsaMultiSampler.cxx.
References fChannelsToSend, fComponentsToSend, and SendData().
Referenced by ConditionalRun().
|
protectedvirtual |
Extract SysId and channel information if provided in the binary options
Extract SysId
Extract Channel name
Look if SysId is already defined
SysId already there, redefine the corresponding channel name
SysId unknown yet, add both SysId and channe name at end of respective vectors
Catches and ignores the channels for missing TS indices and commands
Definition at line 63 of file CbmMQTsaMultiSampler.cxx.
References fAllowedChannels, fbNoSplitTs, fbSendTsPerChannel, fbSendTsPerSysId, fComponentsToSend, fDirName, fFileName, fHighWaterMark, fHost, fInputFileList, fMaxTimeslices, fPort, fsChannelNameCommands, fsChannelNameMissedTs, fSource, fSysId, fTime, IsChannelNameAllowed(), and pos.
|
private |
If sending full TS, accept any name!
If sending per channel, do not stop the loop as we allow more than 1 comp type per channel
If sending per channel, do not stop the loop but still check if at least 1 match found
Definition at line 332 of file CbmMQTsaMultiSampler.cxx.
References fAllowedChannels, fbNoSplitTs, fbSendTsPerChannel, fChannelsToSend, fComponentsToSend, and fSysId.
Referenced by InitTask().
|
private |
|
private |
Definition at line 927 of file CbmMQTsaMultiSampler.cxx.
|
private |
Definition at line 861 of file CbmMQTsaMultiSampler.cxx.
References fsChannelNameCommands.
Referenced by ConditionalRun().
|
private |
Definition at line 763 of file CbmMQTsaMultiSampler.cxx.
References fChannelsToSend, fComponentsToSend, and fMessageCounter.
|
private |
Definition at line 801 of file CbmMQTsaMultiSampler.cxx.
References fMessageCounter.
|
private |
|
private |
Definition at line 833 of file CbmMQTsaMultiSampler.cxx.
References fsChannelNameMissedTs.
Referenced by ConditionalRun().
|
private |
Definition at line 95 of file CbmMQTsaMultiSampler.h.
Referenced by InitTask(), and IsChannelNameAllowed().
|
private |
Definition at line 112 of file CbmMQTsaMultiSampler.h.
Referenced by CreateAndCombineComponentsPerChannel().
|
private |
Definition at line 109 of file CbmMQTsaMultiSampler.h.
Referenced by CreateAndCombineComponentsPerSysId().
|
protected |
Definition at line 40 of file CbmMQTsaMultiSampler.h.
Referenced by ConditionalRun(), InitTask(), and IsChannelNameAllowed().
|
protected |
Definition at line 42 of file CbmMQTsaMultiSampler.h.
Referenced by ConditionalRun(), InitTask(), and IsChannelNameAllowed().
|
protected |
Definition at line 41 of file CbmMQTsaMultiSampler.h.
Referenced by ConditionalRun(), and InitTask().
|
private |
Definition at line 106 of file CbmMQTsaMultiSampler.h.
Referenced by CreateAndCombineComponentsPerChannel(), CreateAndSendFullTs(), IsChannelNameAllowed(), and SendData().
|
private |
Definition at line 105 of file CbmMQTsaMultiSampler.h.
Referenced by CreateAndCombineComponentsPerChannel(), CreateAndCombineComponentsPerSysId(), CreateAndSendComponent(), CreateAndSendFullTs(), InitTask(), IsChannelNameAllowed(), and SendData().
|
protected |
Definition at line 32 of file CbmMQTsaMultiSampler.h.
Referenced by InitTask().
|
protected |
Definition at line 35 of file CbmMQTsaMultiSampler.h.
|
protected |
Definition at line 31 of file CbmMQTsaMultiSampler.h.
Referenced by InitTask().
|
protected |
Definition at line 38 of file CbmMQTsaMultiSampler.h.
Referenced by InitTask().
|
protected |
Definition at line 36 of file CbmMQTsaMultiSampler.h.
Referenced by InitTask().
|
protected |
List of input files.
Definition at line 34 of file CbmMQTsaMultiSampler.h.
Referenced by InitTask().
|
protected |
Definition at line 55 of file CbmMQTsaMultiSampler.h.
|
protected |
Definition at line 29 of file CbmMQTsaMultiSampler.h.
Referenced by ConditionalRun(), and InitTask().
|
protected |
Definition at line 53 of file CbmMQTsaMultiSampler.h.
Referenced by SendData().
|
protected |
Definition at line 37 of file CbmMQTsaMultiSampler.h.
Referenced by InitTask().
|
private |
Definition at line 117 of file CbmMQTsaMultiSampler.h.
Referenced by ConditionalRun(), InitTask(), and SendCommand().
|
private |
Definition at line 116 of file CbmMQTsaMultiSampler.h.
Referenced by ConditionalRun(), InitTask(), and SendMissedTsIdx().
|
private |
Definition at line 80 of file CbmMQTsaMultiSampler.h.
Referenced by ConditionalRun(), and InitTask().
|
private |
Definition at line 102 of file CbmMQTsaMultiSampler.h.
Referenced by CreateAndCombineComponentsPerChannel(), CreateAndCombineComponentsPerSysId(), CreateAndSendComponent(), InitTask(), and IsChannelNameAllowed().
|
private |
Definition at line 81 of file CbmMQTsaMultiSampler.h.
Referenced by CalcRuntime(), and InitTask().
|
protected |
Definition at line 52 of file CbmMQTsaMultiSampler.h.
Referenced by ConditionalRun().
|
protected |
Definition at line 51 of file CbmMQTsaMultiSampler.h.
Referenced by ConditionalRun().
|
private |
Definition at line 113 of file CbmMQTsaMultiSampler.h.
Referenced by CreateAndCombineComponentsPerChannel().
|
private |
Definition at line 114 of file CbmMQTsaMultiSampler.h.
Referenced by CreateAndCombineComponentsPerChannel().
|
private |
Definition at line 110 of file CbmMQTsaMultiSampler.h.
Referenced by CreateAndCombineComponentsPerSysId().