CbmRoot
CbmMQTsaSamplerTof Class Reference

#include <CbmMQTsaSamplerTof.h>

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

Public Member Functions

 CbmMQTsaSamplerTof ()
 
virtual ~CbmMQTsaSamplerTof ()
 

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 IsChannelUp (std::string)
 
bool CreateAndSendComponent (const fles::Timeslice &, int)
 
bool SendData (const fles::StorableTimeslice &, int)
 
bool CreateAndCombineComponents (const fles::Timeslice &, int)
 
bool AppendData (const fles::StorableTimeslice &, int)
 
bool SendTs ()
 
void SendSysCmdStop ()
 

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

CbmMQTsaSamplerTof.h

Since
2018-09-14
Author
N. Herrmann

Definition at line 24 of file CbmMQTsaSamplerTof.h.

Constructor & Destructor Documentation

◆ CbmMQTsaSamplerTof()

CbmMQTsaSamplerTof::CbmMQTsaSamplerTof ( )

Definition at line 41 of file CbmMQTsaSamplerTof.cxx.

◆ ~CbmMQTsaSamplerTof()

CbmMQTsaSamplerTof::~CbmMQTsaSamplerTof ( )
virtual

Definition at line 529 of file CbmMQTsaSamplerTof.cxx.

Member Function Documentation

◆ AppendData()

bool CbmMQTsaSamplerTof::AppendData ( const fles::StorableTimeslice &  ,
int   
)
private

Definition at line 420 of file CbmMQTsaSamplerTof.cxx.

◆ CalcRuntime()

void CbmMQTsaSamplerTof::CalcRuntime ( )
private

Definition at line 531 of file CbmMQTsaSamplerTof.cxx.

References fTime.

Referenced by ConditionalRun().

◆ CheckTimeslice()

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

Definition at line 558 of file CbmMQTsaSamplerTof.cxx.

Referenced by ConditionalRun().

◆ ConditionalRun()

bool CbmMQTsaSamplerTof::ConditionalRun ( )
protectedvirtual

◆ CreateAndCombineComponents()

bool CbmMQTsaSamplerTof::CreateAndCombineComponents ( const fles::Timeslice &  ,
int   
)
private

Definition at line 386 of file CbmMQTsaSamplerTof.cxx.

◆ CreateAndSendComponent()

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

Definition at line 458 of file CbmMQTsaSamplerTof.cxx.

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

◆ InitTask()

void CbmMQTsaSamplerTof::InitTask ( )
protectedvirtual

◆ IsChannelNameAllowed()

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

Definition at line 224 of file CbmMQTsaSamplerTof.cxx.

References fAllowedChannels, fChannelsToSend, fComponentsToSend, and pos.

Referenced by InitTask().

◆ IsChannelUp()

bool CbmMQTsaSamplerTof::IsChannelUp ( std::string  channelName)
private

Definition at line 250 of file CbmMQTsaSamplerTof.cxx.

Referenced by SendSysCmdStop().

◆ OpenNextFile()

bool CbmMQTsaSamplerTof::OpenNextFile ( )
private

Definition at line 199 of file CbmMQTsaSamplerTof.cxx.

References fFileName, fInputFileList, and fSource.

Referenced by ConditionalRun(), and InitTask().

◆ PrintMicroSliceDescriptor()

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

Definition at line 540 of file CbmMQTsaSamplerTof.cxx.

◆ SendData() [1/2]

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

Definition at line 490 of file CbmMQTsaSamplerTof.cxx.

References fChannelsToSend, fComponentsToSend, and fMessageCounter.

◆ SendData() [2/2]

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

Referenced by CreateAndSendComponent().

◆ SendSysCmdStop()

void CbmMQTsaSamplerTof::SendSysCmdStop ( )
private

Definition at line 587 of file CbmMQTsaSamplerTof.cxx.

References IsChannelUp().

Referenced by ConditionalRun().

◆ SendTs()

bool CbmMQTsaSamplerTof::SendTs ( )
private

Definition at line 440 of file CbmMQTsaSamplerTof.cxx.

Member Data Documentation

◆ fAllowedChannels

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

Definition at line 80 of file CbmMQTsaSamplerTof.h.

Referenced by IsChannelNameAllowed().

◆ fChannelsToSend

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

Definition at line 88 of file CbmMQTsaSamplerTof.h.

Referenced by ConditionalRun(), IsChannelNameAllowed(), and SendData().

◆ fComponentsToSend

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

◆ fDirName

std::string CbmMQTsaSamplerTof::fDirName
protected

Definition at line 33 of file CbmMQTsaSamplerTof.h.

Referenced by InitTask().

◆ fFileCounter

uint64_t CbmMQTsaSamplerTof::fFileCounter
protected

Definition at line 36 of file CbmMQTsaSamplerTof.h.

◆ fFileName

std::string CbmMQTsaSamplerTof::fFileName
protected

Definition at line 32 of file CbmMQTsaSamplerTof.h.

Referenced by InitTask(), and OpenNextFile().

◆ fHost

std::string CbmMQTsaSamplerTof::fHost
protected

Definition at line 37 of file CbmMQTsaSamplerTof.h.

Referenced by InitTask().

◆ fInputFileList

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

List of input files.

Definition at line 35 of file CbmMQTsaSamplerTof.h.

Referenced by InitTask(), and OpenNextFile().

◆ fMaxMemory

int CbmMQTsaSamplerTof::fMaxMemory = 0
protected

Definition at line 44 of file CbmMQTsaSamplerTof.h.

◆ fMaxTimeslices

uint64_t CbmMQTsaSamplerTof::fMaxTimeslices
protected

Definition at line 30 of file CbmMQTsaSamplerTof.h.

Referenced by ConditionalRun(), and InitTask().

◆ fMessageCounter

uint64_t CbmMQTsaSamplerTof::fMessageCounter
protected

Definition at line 42 of file CbmMQTsaSamplerTof.h.

Referenced by ConditionalRun(), and SendData().

◆ fPort

uint64_t CbmMQTsaSamplerTof::fPort
protected

Definition at line 38 of file CbmMQTsaSamplerTof.h.

Referenced by InitTask().

◆ fSource

fles::TimesliceSource* CbmMQTsaSamplerTof::fSource
private

Definition at line 65 of file CbmMQTsaSamplerTof.h.

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

◆ fSysId

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

Definition at line 85 of file CbmMQTsaSamplerTof.h.

Referenced by ConditionalRun(), and CreateAndSendComponent().

◆ fTime

std::chrono::steady_clock::time_point CbmMQTsaSamplerTof::fTime
private

Definition at line 66 of file CbmMQTsaSamplerTof.h.

Referenced by CalcRuntime(), and InitTask().

◆ fTSCounter

uint64_t CbmMQTsaSamplerTof::fTSCounter
protected

Definition at line 41 of file CbmMQTsaSamplerTof.h.

Referenced by ConditionalRun().

◆ fTSNumber

uint64_t CbmMQTsaSamplerTof::fTSNumber
protected

Definition at line 40 of file CbmMQTsaSamplerTof.h.


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