CbmRoot
CbmDeviceMonitorT0 Class Reference

#include <CbmDeviceMonitorT0.h>

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

Public Member Functions

 CbmDeviceMonitorT0 ()
 
virtual ~CbmDeviceMonitorT0 ()
 

Protected Member Functions

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

Private Member Functions

bool IsChannelNameAllowed (std::string channelName)
 
Bool_t InitContainers ()
 
Bool_t DoUnpack (const fles::Timeslice &ts, size_t component)
 
void Finish ()
 
bool SendHistograms ()
 

Private Attributes

Bool_t fbIgnoreOverlapMs
 Control flags. More...
 
Bool_t fbComponentsAddedToList = kFALSE
 Ignore Overlap Ms: all fuOverlapMsNb MS at the end of timeslice. More...
 
std::string fsChannelNameDataInput
 User settings parameters. More...
 
std::string fsChannelNameHistosInput
 
std::string fsChannelNameHistosConfig
 
std::string fsChannelNameCanvasConfig
 
uint32_t fuHistoryHistoSize
 
uint32_t fuMinTotPulser
 
uint32_t fuMaxTotPulser
 
uint32_t fuOffSpillCountLimit
 
uint32_t fuPublishFreqTs
 
double_t fdMinPublishTime
 
double_t fdMaxPublishTime
 
std::vector< std::string > fsAllowedChannels
 List of MQ channels names. More...
 
TList * fParCList
 Parameters management. More...
 
uint64_t fulNumMessages
 Statistics & first TS rejection. More...
 
uint64_t fulTsCounter
 
std::chrono::system_clock::time_point fLastPublishTime
 
CbmMcbm2018MonitorAlgoT0fMonitorAlgo
 Processing algo. More...
 
TObjArray fArrayHisto
 Array of histograms to send to the histogram server. More...
 
std::vector< std::pair< std::string, std::string > > fvpsHistosFolder
 Vector of string pairs with ( HistoName, FolderPath ) to send to the histogram server. More...
 
std::vector< std::pair< std::string, std::string > > fvpsCanvasConfig
 

Static Private Attributes

static const uint16_t kusSysId = 0x90
 Constants. More...
 

Detailed Description

Definition at line 26 of file CbmDeviceMonitorT0.h.

Constructor & Destructor Documentation

◆ CbmDeviceMonitorT0()

CbmDeviceMonitorT0::CbmDeviceMonitorT0 ( )

Definition at line 44 of file CbmDeviceMonitorT0.cxx.

◆ ~CbmDeviceMonitorT0()

CbmDeviceMonitorT0::~CbmDeviceMonitorT0 ( )
virtual

Definition at line 333 of file CbmDeviceMonitorT0.cxx.

Member Function Documentation

◆ DoUnpack()

Bool_t CbmDeviceMonitorT0::DoUnpack ( const fles::Timeslice &  ts,
size_t  component 
)
private

◆ Finish()

void CbmDeviceMonitorT0::Finish ( )
private

Definition at line 370 of file CbmDeviceMonitorT0.cxx.

◆ HandleData()

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

Create an empty TS and fill it with the incoming message

Process the Timeslice

Send histograms each 100 time slices. Should be each ~1s Use also runtime checker to trigger sending after M s if processing too slow or delay sending if processing too fast

Definition at line 261 of file CbmDeviceMonitorT0.cxx.

References DoUnpack(), fdMaxPublishTime, fdMinPublishTime, fLastPublishTime, fulNumMessages, fuPublishFreqTs, and SendHistograms().

Referenced by InitTask().

◆ InitContainers()

Bool_t CbmDeviceMonitorT0::InitContainers ( )
private

Need to add accessors for all options

Histos creation and obtain pointer on them Trigger histo creation on all associated algos

Obtain vector of pointers on each histo from the algo (+ optionally desired folder)

Obtain vector of pointers on each canvas from the algo (+ optionally desired folder)

Add pointers to each histo in the histo array Create histo config vector ===> Use an std::vector< std::pair< std::string, std::string > > with < Histo name, Folder > and send it through a separate channel using the BoostSerializer

Serialize the vector of histo config into a single MQ message

Send message to the common histogram config messages queue

Create canvas config vector ===> Use an std::vector< std::pair< std::string, std::string > > with < Canvas name, config > and send it through a separate channel using the BoostSerializer

Serialize the vector of canvas config into a single MQ message

Send message to the common canvas config messages queue

Definition at line 138 of file CbmDeviceMonitorT0.cxx.

References CbmMcbm2018MonitorAlgoT0::CreateHistograms(), fArrayHisto, fbIgnoreOverlapMs, first, fMonitorAlgo, fParCList, fsChannelNameCanvasConfig, fsChannelNameHistosConfig, fuHistoryHistoSize, fuMaxTotPulser, fuMinTotPulser, fuOffSpillCountLimit, fvpsCanvasConfig, fvpsHistosFolder, GenerateCanvasConfigString(), CbmStar2019Algo< T >::GetCanvasVector(), CbmStar2019Algo< T >::GetHistoVector(), CbmMcbm2018MonitorAlgoT0::GetParList(), CbmMcbm2018MonitorAlgoT0::InitContainers(), CbmMcbm2018MonitorAlgoT0::SetHistoryHistoSize(), CbmStar2019Algo< T >::SetIgnoreOverlapMs(), CbmMcbm2018MonitorAlgoT0::SetMonitorMode(), CbmMcbm2018MonitorAlgoT0::SetPulserTotLimits(), and CbmMcbm2018MonitorAlgoT0::SetSpillThreshold().

Referenced by InitTask().

◆ InitTask()

◆ IsChannelNameAllowed()

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

Definition at line 117 of file CbmDeviceMonitorT0.cxx.

References fsAllowedChannels, and pos.

Referenced by InitTask().

◆ SendHistograms()

bool CbmDeviceMonitorT0::SendHistograms ( )
private

Serialize the array of histos into a single MQ message

Send message to the common histogram messages queue

Reset the histograms after sending them (but do not reset the time)

Definition at line 297 of file CbmDeviceMonitorT0.cxx.

References fArrayHisto, fMonitorAlgo, fsChannelNameHistosInput, and CbmMcbm2018MonitorAlgoT0::ResetHistograms().

Referenced by HandleData().

Member Data Documentation

◆ fArrayHisto

TObjArray CbmDeviceMonitorT0::fArrayHisto
private

Array of histograms to send to the histogram server.

Definition at line 72 of file CbmDeviceMonitorT0.h.

Referenced by InitContainers(), and SendHistograms().

◆ fbComponentsAddedToList

Bool_t CbmDeviceMonitorT0::fbComponentsAddedToList = kFALSE
private

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

Definition at line 42 of file CbmDeviceMonitorT0.h.

Referenced by DoUnpack().

◆ fbIgnoreOverlapMs

Bool_t CbmDeviceMonitorT0::fbIgnoreOverlapMs
private

Control flags.

Definition at line 41 of file CbmDeviceMonitorT0.h.

Referenced by InitContainers(), and InitTask().

◆ fdMaxPublishTime

double_t CbmDeviceMonitorT0::fdMaxPublishTime
private

Definition at line 55 of file CbmDeviceMonitorT0.h.

Referenced by HandleData(), and InitTask().

◆ fdMinPublishTime

double_t CbmDeviceMonitorT0::fdMinPublishTime
private

Definition at line 54 of file CbmDeviceMonitorT0.h.

Referenced by HandleData(), and InitTask().

◆ fLastPublishTime

std::chrono::system_clock::time_point CbmDeviceMonitorT0::fLastPublishTime
private

Definition at line 66 of file CbmDeviceMonitorT0.h.

Referenced by HandleData().

◆ fMonitorAlgo

CbmMcbm2018MonitorAlgoT0* CbmDeviceMonitorT0::fMonitorAlgo
private

Processing algo.

Definition at line 69 of file CbmDeviceMonitorT0.h.

Referenced by DoUnpack(), InitContainers(), and SendHistograms().

◆ fParCList

TList* CbmDeviceMonitorT0::fParCList
private

Parameters management.

Definition at line 61 of file CbmDeviceMonitorT0.h.

Referenced by InitContainers().

◆ fsAllowedChannels

std::vector<std::string> CbmDeviceMonitorT0::fsAllowedChannels
private

List of MQ channels names.

Definition at line 58 of file CbmDeviceMonitorT0.h.

Referenced by InitTask(), and IsChannelNameAllowed().

◆ fsChannelNameCanvasConfig

std::string CbmDeviceMonitorT0::fsChannelNameCanvasConfig
private

Definition at line 48 of file CbmDeviceMonitorT0.h.

Referenced by InitContainers(), and InitTask().

◆ fsChannelNameDataInput

std::string CbmDeviceMonitorT0::fsChannelNameDataInput
private

User settings parameters.

Definition at line 45 of file CbmDeviceMonitorT0.h.

Referenced by InitTask().

◆ fsChannelNameHistosConfig

std::string CbmDeviceMonitorT0::fsChannelNameHistosConfig
private

Definition at line 47 of file CbmDeviceMonitorT0.h.

Referenced by InitContainers(), and InitTask().

◆ fsChannelNameHistosInput

std::string CbmDeviceMonitorT0::fsChannelNameHistosInput
private

Definition at line 46 of file CbmDeviceMonitorT0.h.

Referenced by InitTask(), and SendHistograms().

◆ fuHistoryHistoSize

uint32_t CbmDeviceMonitorT0::fuHistoryHistoSize
private

Definition at line 49 of file CbmDeviceMonitorT0.h.

Referenced by InitContainers(), and InitTask().

◆ fulNumMessages

uint64_t CbmDeviceMonitorT0::fulNumMessages
private

Statistics & first TS rejection.

Definition at line 64 of file CbmDeviceMonitorT0.h.

Referenced by HandleData().

◆ fulTsCounter

uint64_t CbmDeviceMonitorT0::fulTsCounter
private

Definition at line 65 of file CbmDeviceMonitorT0.h.

Referenced by DoUnpack().

◆ fuMaxTotPulser

uint32_t CbmDeviceMonitorT0::fuMaxTotPulser
private

Definition at line 51 of file CbmDeviceMonitorT0.h.

Referenced by InitContainers(), and InitTask().

◆ fuMinTotPulser

uint32_t CbmDeviceMonitorT0::fuMinTotPulser
private

Definition at line 50 of file CbmDeviceMonitorT0.h.

Referenced by InitContainers(), and InitTask().

◆ fuOffSpillCountLimit

uint32_t CbmDeviceMonitorT0::fuOffSpillCountLimit
private

Definition at line 52 of file CbmDeviceMonitorT0.h.

Referenced by InitContainers(), and InitTask().

◆ fuPublishFreqTs

uint32_t CbmDeviceMonitorT0::fuPublishFreqTs
private

Definition at line 53 of file CbmDeviceMonitorT0.h.

Referenced by HandleData(), and InitTask().

◆ fvpsCanvasConfig

std::vector<std::pair<std::string, std::string> > CbmDeviceMonitorT0::fvpsCanvasConfig
private

Vector of string pairs with ( CanvasName, CanvasConfig ) to send to the histogram server Format of Can config is "NbPadX(U);NbPadY(U);ConfigPad1(s);....;ConfigPadXY(s)" Format of Pad config is "GrixX(b),GridY(b),LogX(b),LogY(b),LogZ(b),HistoName(s),DrawOptions(s)"

Definition at line 78 of file CbmDeviceMonitorT0.h.

Referenced by InitContainers().

◆ fvpsHistosFolder

std::vector<std::pair<std::string, std::string> > CbmDeviceMonitorT0::fvpsHistosFolder
private

Vector of string pairs with ( HistoName, FolderPath ) to send to the histogram server.

Definition at line 74 of file CbmDeviceMonitorT0.h.

Referenced by InitContainers().

◆ kusSysId

const uint16_t CbmDeviceMonitorT0::kusSysId = 0x90
staticprivate

Constants.

Definition at line 37 of file CbmDeviceMonitorT0.h.

Referenced by DoUnpack().


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