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

#include <CbmDeviceMonitorBmon.h>

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

Public Member Functions

 CbmDeviceMonitorBmon ()
 
virtual ~CbmDeviceMonitorBmon ()
 

Protected Member Functions

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

Private Member Functions

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

Private Attributes

Bool_t fbIgnoreOverlapMs
 Control flags.
 
Bool_t fbComponentsAddedToList = kFALSE
 Ignore Overlap Ms: all fuOverlapMsNb MS at the end of timeslice.
 
std::string fsChannelNameDataInput
 User settings parameters.
 
std::string fsChannelNameHistosInput
 
uint32_t fuHistoryHistoSize
 
uint32_t fuMinTotPulser
 
uint32_t fuMaxTotPulser
 
uint32_t fuOffSpillCountLimit
 
uint32_t fuOffSpillCountLimitNonPulser
 
double fdSpillCheckInterval
 
std::vector< uint32_t > fvuChanMap
 
uint32_t fuPublishFreqTs
 
double_t fdMinPublishTime
 
double_t fdMaxPublishTime
 
std::vector< std::string > fsAllowedChannels
 List of MQ channels names.
 
TList * fParCList
 Parameters management.
 
uint64_t fulNumMessages
 Statistics & first TS rejection.
 
uint64_t fulTsCounter
 
std::chrono::system_clock::time_point fLastPublishTime
 
CbmMcbm2018MonitorAlgoBmonfMonitorAlgo
 Processing algo.
 
TObjArray fArrayHisto
 Array of histograms to send to the histogram server.
 
std::vector< std::pair< std::string, std::string > > fvpsHistosFolder
 Vector of string pairs with ( HistoName, FolderPath ) to send to the histogram server.
 
std::vector< std::pair< std::string, std::string > > fvpsCanvasConfig
 
bool fbConfigSent = false
 Flag indicating whether the histograms and canvases configurations were already published.
 

Static Private Attributes

static const uint16_t kusSysId = 0x90
 Constants.
 

Detailed Description

Definition at line 31 of file CbmDeviceMonitorBmon.h.

Constructor & Destructor Documentation

◆ CbmDeviceMonitorBmon()

CbmDeviceMonitorBmon::CbmDeviceMonitorBmon ( )

Definition at line 46 of file CbmDeviceMonitorBmon.cxx.

◆ ~CbmDeviceMonitorBmon()

CbmDeviceMonitorBmon::~CbmDeviceMonitorBmon ( )
virtual

Definition at line 378 of file CbmDeviceMonitorBmon.cxx.

Member Function Documentation

◆ DoUnpack()

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

◆ Finish()

void CbmDeviceMonitorBmon::Finish ( )
private

Definition at line 407 of file CbmDeviceMonitorBmon.cxx.

◆ HandleData()

bool CbmDeviceMonitorBmon::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 259 of file CbmDeviceMonitorBmon.cxx.

References DoUnpack(), fbConfigSent, fdMaxPublishTime, fdMinPublishTime, fLastPublishTime, fulNumMessages, fuPublishFreqTs, InitContainers(), InitHistograms(), SendHistoConfAndData(), and SendHistograms().

Referenced by InitTask().

◆ InitContainers()

◆ InitHistograms()

bool CbmDeviceMonitorBmon::InitHistograms ( )
private

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

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

Definition at line 212 of file CbmDeviceMonitorBmon.cxx.

References CbmMcbm2018MonitorAlgoBmon::CreateHistograms(), fArrayHisto, first, fMonitorAlgo, fvpsCanvasConfig, fvpsHistosFolder, GenerateCanvasConfigString(), CbmStar2019Algo< T >::GetCanvasVector(), and CbmStar2019Algo< T >::GetHistoVector().

Referenced by HandleData().

◆ InitTask()

◆ IsChannelNameAllowed()

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

Definition at line 137 of file CbmDeviceMonitorBmon.cxx.

References fsAllowedChannels, and pos.

Referenced by InitTask().

◆ SendHistoConfAndData()

bool CbmDeviceMonitorBmon::SendHistoConfAndData ( )
private

Prepare multiparts message and header

Serialize the vector of histo config into a single MQ message

Serialize the vector of canvas config into a single MQ message

Serialize the array of histos into a single MQ message

Send the multi-parts message to the common histogram messages queue

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

Definition at line 310 of file CbmDeviceMonitorBmon.cxx.

References fArrayHisto, fMonitorAlgo, fsChannelNameHistosInput, fvpsCanvasConfig, fvpsHistosFolder, and CbmMcbm2018MonitorAlgoBmon::ResetHistograms().

Referenced by HandleData().

◆ SendHistograms()

bool CbmDeviceMonitorBmon::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 358 of file CbmDeviceMonitorBmon.cxx.

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

Referenced by HandleData().

Member Data Documentation

◆ fArrayHisto

TObjArray CbmDeviceMonitorBmon::fArrayHisto
private

Array of histograms to send to the histogram server.

Definition at line 77 of file CbmDeviceMonitorBmon.h.

Referenced by InitHistograms(), SendHistoConfAndData(), and SendHistograms().

◆ fbComponentsAddedToList

Bool_t CbmDeviceMonitorBmon::fbComponentsAddedToList = kFALSE
private

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

Definition at line 46 of file CbmDeviceMonitorBmon.h.

Referenced by DoUnpack().

◆ fbConfigSent

bool CbmDeviceMonitorBmon::fbConfigSent = false
private

Flag indicating whether the histograms and canvases configurations were already published.

Definition at line 85 of file CbmDeviceMonitorBmon.h.

Referenced by HandleData().

◆ fbIgnoreOverlapMs

Bool_t CbmDeviceMonitorBmon::fbIgnoreOverlapMs
private

Control flags.

Definition at line 45 of file CbmDeviceMonitorBmon.h.

Referenced by InitContainers(), and InitTask().

◆ fdMaxPublishTime

double_t CbmDeviceMonitorBmon::fdMaxPublishTime
private

Definition at line 60 of file CbmDeviceMonitorBmon.h.

Referenced by HandleData(), and InitTask().

◆ fdMinPublishTime

double_t CbmDeviceMonitorBmon::fdMinPublishTime
private

Definition at line 59 of file CbmDeviceMonitorBmon.h.

Referenced by HandleData(), and InitTask().

◆ fdSpillCheckInterval

double CbmDeviceMonitorBmon::fdSpillCheckInterval
private

Definition at line 56 of file CbmDeviceMonitorBmon.h.

Referenced by InitContainers(), and InitTask().

◆ fLastPublishTime

std::chrono::system_clock::time_point CbmDeviceMonitorBmon::fLastPublishTime
private

Definition at line 71 of file CbmDeviceMonitorBmon.h.

Referenced by HandleData().

◆ fMonitorAlgo

CbmMcbm2018MonitorAlgoBmon* CbmDeviceMonitorBmon::fMonitorAlgo
private

Processing algo.

Definition at line 74 of file CbmDeviceMonitorBmon.h.

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

◆ fParCList

TList* CbmDeviceMonitorBmon::fParCList
private

Parameters management.

Definition at line 66 of file CbmDeviceMonitorBmon.h.

Referenced by InitContainers().

◆ fsAllowedChannels

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

List of MQ channels names.

Definition at line 63 of file CbmDeviceMonitorBmon.h.

Referenced by InitTask(), and IsChannelNameAllowed().

◆ fsChannelNameDataInput

std::string CbmDeviceMonitorBmon::fsChannelNameDataInput
private

User settings parameters.

Definition at line 49 of file CbmDeviceMonitorBmon.h.

Referenced by InitTask().

◆ fsChannelNameHistosInput

std::string CbmDeviceMonitorBmon::fsChannelNameHistosInput
private

Definition at line 50 of file CbmDeviceMonitorBmon.h.

Referenced by InitTask(), SendHistoConfAndData(), and SendHistograms().

◆ fuHistoryHistoSize

uint32_t CbmDeviceMonitorBmon::fuHistoryHistoSize
private

Definition at line 51 of file CbmDeviceMonitorBmon.h.

Referenced by InitContainers(), and InitTask().

◆ fulNumMessages

uint64_t CbmDeviceMonitorBmon::fulNumMessages
private

Statistics & first TS rejection.

Definition at line 69 of file CbmDeviceMonitorBmon.h.

Referenced by HandleData().

◆ fulTsCounter

uint64_t CbmDeviceMonitorBmon::fulTsCounter
private

Definition at line 70 of file CbmDeviceMonitorBmon.h.

Referenced by DoUnpack().

◆ fuMaxTotPulser

uint32_t CbmDeviceMonitorBmon::fuMaxTotPulser
private

Definition at line 53 of file CbmDeviceMonitorBmon.h.

Referenced by InitContainers(), and InitTask().

◆ fuMinTotPulser

uint32_t CbmDeviceMonitorBmon::fuMinTotPulser
private

Definition at line 52 of file CbmDeviceMonitorBmon.h.

Referenced by InitContainers(), and InitTask().

◆ fuOffSpillCountLimit

uint32_t CbmDeviceMonitorBmon::fuOffSpillCountLimit
private

Definition at line 54 of file CbmDeviceMonitorBmon.h.

Referenced by InitContainers(), and InitTask().

◆ fuOffSpillCountLimitNonPulser

uint32_t CbmDeviceMonitorBmon::fuOffSpillCountLimitNonPulser
private

Definition at line 55 of file CbmDeviceMonitorBmon.h.

Referenced by InitContainers(), and InitTask().

◆ fuPublishFreqTs

uint32_t CbmDeviceMonitorBmon::fuPublishFreqTs
private

Definition at line 58 of file CbmDeviceMonitorBmon.h.

Referenced by HandleData(), and InitTask().

◆ fvpsCanvasConfig

std::vector<std::pair<std::string, std::string> > CbmDeviceMonitorBmon::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 83 of file CbmDeviceMonitorBmon.h.

Referenced by InitHistograms(), and SendHistoConfAndData().

◆ fvpsHistosFolder

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

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

Definition at line 79 of file CbmDeviceMonitorBmon.h.

Referenced by InitHistograms(), and SendHistoConfAndData().

◆ fvuChanMap

std::vector<uint32_t> CbmDeviceMonitorBmon::fvuChanMap
private

Definition at line 57 of file CbmDeviceMonitorBmon.h.

Referenced by InitContainers(), and InitTask().

◆ kusSysId

const uint16_t CbmDeviceMonitorBmon::kusSysId = 0x90
staticprivate

Constants.

Definition at line 42 of file CbmDeviceMonitorBmon.h.

Referenced by DoUnpack().


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