CbmRoot
CbmMQTsaSampler Class Reference

#include <CbmMQTsaSampler.h>

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

Public Member Functions

 CbmMQTsaSampler ()
 
virtual ~CbmMQTsaSampler ()
 

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 fTSNumber
 
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 SendData (const fles::StorableTimeslice &, int)
 

Private Attributes

fles::TimesliceSource * fSource
 
std::chrono::steady_clock::time_point fTime
 
std::vector< std::string > fAllowedChannels
 
std::vector< int > fSysId = {16, 64, 96}
 
std::vector< int > fComponentsToSend = {0, 0, 0}
 
std::vector< std::vector< std::string > > fChannelsToSend = {{}, {}, {}}
 

Detailed Description

CbmMQTsaSampler.h

Since
2017-11-17
Author
F. Uhlig

Definition at line 24 of file CbmMQTsaSampler.h.

Constructor & Destructor Documentation

◆ CbmMQTsaSampler()

CbmMQTsaSampler::CbmMQTsaSampler ( )

Definition at line 40 of file CbmMQTsaSampler.cxx.

◆ ~CbmMQTsaSampler()

CbmMQTsaSampler::~CbmMQTsaSampler ( )
virtual

Definition at line 358 of file CbmMQTsaSampler.cxx.

Member Function Documentation

◆ CalcRuntime()

void CbmMQTsaSampler::CalcRuntime ( )
private

Definition at line 360 of file CbmMQTsaSampler.cxx.

References fTime.

Referenced by ConditionalRun().

◆ CheckTimeslice()

bool CbmMQTsaSampler::CheckTimeslice ( const fles::Timeslice &  ts)
private

Definition at line 387 of file CbmMQTsaSampler.cxx.

Referenced by ConditionalRun().

◆ ConditionalRun()

bool CbmMQTsaSampler::ConditionalRun ( )
protectedvirtual

◆ CreateAndSendComponent()

bool CbmMQTsaSampler::CreateAndSendComponent ( const fles::Timeslice &  ts,
int  nrComp 
)
private

Definition at line 287 of file CbmMQTsaSampler.cxx.

References fComponentsToSend, fSysId, m, pos, and SendData().

Referenced by ConditionalRun().

◆ InitTask()

void CbmMQTsaSampler::InitTask ( )
protectedvirtual

◆ IsChannelNameAllowed()

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

Definition at line 222 of file CbmMQTsaSampler.cxx.

References fAllowedChannels, fChannelsToSend, fComponentsToSend, and pos.

Referenced by InitTask().

◆ OpenNextFile()

bool CbmMQTsaSampler::OpenNextFile ( )
private

Definition at line 197 of file CbmMQTsaSampler.cxx.

References fFileName, fInputFileList, and fSource.

Referenced by ConditionalRun(), and InitTask().

◆ PrintMicroSliceDescriptor()

void CbmMQTsaSampler::PrintMicroSliceDescriptor ( const fles::MicrosliceDescriptor &  mdsc)
private

Definition at line 369 of file CbmMQTsaSampler.cxx.

◆ SendData() [1/2]

bool CbmMQTsaSampler::SendData ( const fles::StorableTimeslice &  component,
int  idx 
)
private

Definition at line 319 of file CbmMQTsaSampler.cxx.

References fChannelsToSend, fComponentsToSend, and fMessageCounter.

◆ SendData() [2/2]

bool CbmMQTsaSampler::SendData ( const fles::StorableTimeslice &  component)
private

Referenced by CreateAndSendComponent().

Member Data Documentation

◆ fAllowedChannels

std::vector<std::string> CbmMQTsaSampler::fAllowedChannels
private
Initial value:
= {"stscomponent",
"trdcomponent",
"tofcomponent"}

Definition at line 75 of file CbmMQTsaSampler.h.

Referenced by IsChannelNameAllowed().

◆ fChannelsToSend

std::vector<std::vector<std::string> > CbmMQTsaSampler::fChannelsToSend = {{}, {}, {}}
private

Definition at line 82 of file CbmMQTsaSampler.h.

Referenced by IsChannelNameAllowed(), and SendData().

◆ fComponentsToSend

std::vector<int> CbmMQTsaSampler::fComponentsToSend = {0, 0, 0}
private

Definition at line 81 of file CbmMQTsaSampler.h.

Referenced by CreateAndSendComponent(), InitTask(), IsChannelNameAllowed(), and SendData().

◆ fDirName

std::string CbmMQTsaSampler::fDirName
protected

Definition at line 33 of file CbmMQTsaSampler.h.

Referenced by InitTask().

◆ fFileCounter

uint64_t CbmMQTsaSampler::fFileCounter
protected

Definition at line 36 of file CbmMQTsaSampler.h.

◆ fFileName

std::string CbmMQTsaSampler::fFileName
protected

Definition at line 32 of file CbmMQTsaSampler.h.

Referenced by InitTask(), and OpenNextFile().

◆ fHost

std::string CbmMQTsaSampler::fHost
protected

Definition at line 37 of file CbmMQTsaSampler.h.

Referenced by InitTask().

◆ fInputFileList

std::vector<std::string> CbmMQTsaSampler::fInputFileList
protected

List of input files.

Definition at line 35 of file CbmMQTsaSampler.h.

Referenced by InitTask(), and OpenNextFile().

◆ fMaxMemory

int CbmMQTsaSampler::fMaxMemory = 0
protected

Definition at line 44 of file CbmMQTsaSampler.h.

◆ fMaxTimeslices

uint64_t CbmMQTsaSampler::fMaxTimeslices
protected

Definition at line 30 of file CbmMQTsaSampler.h.

Referenced by ConditionalRun(), and InitTask().

◆ fMessageCounter

uint64_t CbmMQTsaSampler::fMessageCounter
protected

Definition at line 42 of file CbmMQTsaSampler.h.

Referenced by SendData().

◆ fPort

uint64_t CbmMQTsaSampler::fPort
protected

Definition at line 38 of file CbmMQTsaSampler.h.

Referenced by InitTask().

◆ fSource

fles::TimesliceSource* CbmMQTsaSampler::fSource
private

Definition at line 60 of file CbmMQTsaSampler.h.

Referenced by ConditionalRun(), InitTask(), and OpenNextFile().

◆ fSysId

std::vector<int> CbmMQTsaSampler::fSysId = {16, 64, 96}
private

Definition at line 78 of file CbmMQTsaSampler.h.

Referenced by CreateAndSendComponent().

◆ fTime

std::chrono::steady_clock::time_point CbmMQTsaSampler::fTime
private

Definition at line 61 of file CbmMQTsaSampler.h.

Referenced by CalcRuntime(), and InitTask().

◆ fTSCounter

uint64_t CbmMQTsaSampler::fTSCounter
protected

Definition at line 41 of file CbmMQTsaSampler.h.

Referenced by ConditionalRun().

◆ fTSNumber

uint64_t CbmMQTsaSampler::fTSNumber
protected

Definition at line 40 of file CbmMQTsaSampler.h.


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