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

#include <CbmDeviceMonitorReqBmon.h>

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

Public Member Functions

 CbmDeviceMonitorReqBmon ()
 
virtual ~CbmDeviceMonitorReqBmon ()
 

Protected Member Functions

virtual void InitTask ()
 
virtual bool ConditionalRun ()
 

Private Member Functions

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

Private Attributes

Bool_t fbIgnoreOverlapMs = kFALSE
 Control flags.
 
Bool_t fbComponentsAddedToList = kFALSE
 Ignore Overlap Ms: all fuOverlapMsNb MS at the end of timeslice.
 
std::string fsChannelNameDataInput = "ts-request"
 User settings parameters.
 
std::string fsTsBlockName = "t0block"
 
std::string fsChannelNameHistosInput = "histogram-in"
 
uint32_t fuHistoryHistoSize = 3600
 
uint32_t fuMinTotPulser = 185
 
uint32_t fuMaxTotPulser = 195
 
uint32_t fuOffSpillCountLimit = 25
 
uint32_t fuOffSpillCountLimitNonPulser = 10
 
double fdSpillCheckInterval = 0.0128
 
std::vector< uint32_t > fvuChanMap = {0, 1, 2, 3, 4, 5, 6, 7}
 
uint32_t fuPublishFreqTs = 100
 
double_t fdMinPublishTime = 0.5
 
double_t fdMaxPublishTime = 5.0
 
TList * fParCList = nullptr
 Parameters management.
 
uint64_t fulNumMessages = 0
 Statistics & first TS rejection.
 
uint64_t fulTsCounter = 0
 
std::chrono::system_clock::time_point fLastPublishTime = std::chrono::system_clock::now()
 
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 24 of file CbmDeviceMonitorReqBmon.h.

Constructor & Destructor Documentation

◆ CbmDeviceMonitorReqBmon()

CbmDeviceMonitorReqBmon::CbmDeviceMonitorReqBmon ( )

Definition at line 39 of file CbmDeviceMonitorReqBmon.cxx.

◆ ~CbmDeviceMonitorReqBmon()

CbmDeviceMonitorReqBmon::~CbmDeviceMonitorReqBmon ( )
virtual

Definition at line 330 of file CbmDeviceMonitorReqBmon.cxx.

Member Function Documentation

◆ ConditionalRun()

bool CbmDeviceMonitorReqBmon::ConditionalRun ( )
protectedvirtual

First request a new TS (full or single system components or multi-syst components block)

Message received, do Algo related Initialization steps if needed

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 193 of file CbmDeviceMonitorReqBmon.cxx.

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

◆ DoUnpack()

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

◆ Finish()

void CbmDeviceMonitorReqBmon::Finish ( )
private

Definition at line 359 of file CbmDeviceMonitorReqBmon.cxx.

◆ InitContainers()

◆ InitHistograms()

bool CbmDeviceMonitorReqBmon::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 147 of file CbmDeviceMonitorReqBmon.cxx.

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

Referenced by ConditionalRun().

◆ InitTask()

◆ SendHistoConfAndData()

bool CbmDeviceMonitorReqBmon::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 264 of file CbmDeviceMonitorReqBmon.cxx.

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

Referenced by ConditionalRun().

◆ SendHistograms()

bool CbmDeviceMonitorReqBmon::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 310 of file CbmDeviceMonitorReqBmon.cxx.

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

Referenced by ConditionalRun().

Member Data Documentation

◆ fArrayHisto

TObjArray CbmDeviceMonitorReqBmon::fArrayHisto = {}
private

Array of histograms to send to the histogram server.

Definition at line 68 of file CbmDeviceMonitorReqBmon.h.

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

◆ fbComponentsAddedToList

Bool_t CbmDeviceMonitorReqBmon::fbComponentsAddedToList = kFALSE
private

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

Definition at line 39 of file CbmDeviceMonitorReqBmon.h.

Referenced by DoUnpack().

◆ fbConfigSent

bool CbmDeviceMonitorReqBmon::fbConfigSent = false
private

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

Definition at line 76 of file CbmDeviceMonitorReqBmon.h.

Referenced by ConditionalRun().

◆ fbIgnoreOverlapMs

Bool_t CbmDeviceMonitorReqBmon::fbIgnoreOverlapMs = kFALSE
private

Control flags.

Definition at line 38 of file CbmDeviceMonitorReqBmon.h.

Referenced by InitContainers(), and InitTask().

◆ fdMaxPublishTime

double_t CbmDeviceMonitorReqBmon::fdMaxPublishTime = 5.0
private

Definition at line 54 of file CbmDeviceMonitorReqBmon.h.

Referenced by ConditionalRun(), and InitTask().

◆ fdMinPublishTime

double_t CbmDeviceMonitorReqBmon::fdMinPublishTime = 0.5
private

Definition at line 53 of file CbmDeviceMonitorReqBmon.h.

Referenced by ConditionalRun(), and InitTask().

◆ fdSpillCheckInterval

double CbmDeviceMonitorReqBmon::fdSpillCheckInterval = 0.0128
private

Definition at line 50 of file CbmDeviceMonitorReqBmon.h.

Referenced by InitContainers(), and InitTask().

◆ fLastPublishTime

std::chrono::system_clock::time_point CbmDeviceMonitorReqBmon::fLastPublishTime = std::chrono::system_clock::now()
private

Definition at line 62 of file CbmDeviceMonitorReqBmon.h.

Referenced by ConditionalRun().

◆ fMonitorAlgo

CbmMcbm2018MonitorAlgoBmon* CbmDeviceMonitorReqBmon::fMonitorAlgo
private

Processing algo.

Definition at line 65 of file CbmDeviceMonitorReqBmon.h.

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

◆ fParCList

TList* CbmDeviceMonitorReqBmon::fParCList = nullptr
private

Parameters management.

Definition at line 57 of file CbmDeviceMonitorReqBmon.h.

Referenced by InitContainers().

◆ fsChannelNameDataInput

std::string CbmDeviceMonitorReqBmon::fsChannelNameDataInput = "ts-request"
private

User settings parameters.

Definition at line 42 of file CbmDeviceMonitorReqBmon.h.

Referenced by ConditionalRun(), and InitTask().

◆ fsChannelNameHistosInput

std::string CbmDeviceMonitorReqBmon::fsChannelNameHistosInput = "histogram-in"
private

Definition at line 44 of file CbmDeviceMonitorReqBmon.h.

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

◆ fsTsBlockName

std::string CbmDeviceMonitorReqBmon::fsTsBlockName = "t0block"
private

Definition at line 43 of file CbmDeviceMonitorReqBmon.h.

Referenced by ConditionalRun(), and InitTask().

◆ fuHistoryHistoSize

uint32_t CbmDeviceMonitorReqBmon::fuHistoryHistoSize = 3600
private

Definition at line 45 of file CbmDeviceMonitorReqBmon.h.

Referenced by InitContainers(), and InitTask().

◆ fulNumMessages

uint64_t CbmDeviceMonitorReqBmon::fulNumMessages = 0
private

Statistics & first TS rejection.

Definition at line 60 of file CbmDeviceMonitorReqBmon.h.

Referenced by ConditionalRun().

◆ fulTsCounter

uint64_t CbmDeviceMonitorReqBmon::fulTsCounter = 0
private

Definition at line 61 of file CbmDeviceMonitorReqBmon.h.

Referenced by DoUnpack().

◆ fuMaxTotPulser

uint32_t CbmDeviceMonitorReqBmon::fuMaxTotPulser = 195
private

Definition at line 47 of file CbmDeviceMonitorReqBmon.h.

Referenced by InitContainers(), and InitTask().

◆ fuMinTotPulser

uint32_t CbmDeviceMonitorReqBmon::fuMinTotPulser = 185
private

Definition at line 46 of file CbmDeviceMonitorReqBmon.h.

Referenced by InitContainers(), and InitTask().

◆ fuOffSpillCountLimit

uint32_t CbmDeviceMonitorReqBmon::fuOffSpillCountLimit = 25
private

Definition at line 48 of file CbmDeviceMonitorReqBmon.h.

Referenced by InitContainers(), and InitTask().

◆ fuOffSpillCountLimitNonPulser

uint32_t CbmDeviceMonitorReqBmon::fuOffSpillCountLimitNonPulser = 10
private

Definition at line 49 of file CbmDeviceMonitorReqBmon.h.

Referenced by InitContainers(), and InitTask().

◆ fuPublishFreqTs

uint32_t CbmDeviceMonitorReqBmon::fuPublishFreqTs = 100
private

Definition at line 52 of file CbmDeviceMonitorReqBmon.h.

Referenced by ConditionalRun(), and InitTask().

◆ fvpsCanvasConfig

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

Referenced by InitHistograms(), and SendHistoConfAndData().

◆ fvpsHistosFolder

std::vector<std::pair<std::string, std::string> > CbmDeviceMonitorReqBmon::fvpsHistosFolder = {}
private

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

Definition at line 70 of file CbmDeviceMonitorReqBmon.h.

Referenced by InitHistograms(), and SendHistoConfAndData().

◆ fvuChanMap

std::vector<uint32_t> CbmDeviceMonitorReqBmon::fvuChanMap = {0, 1, 2, 3, 4, 5, 6, 7}
private

Definition at line 51 of file CbmDeviceMonitorReqBmon.h.

Referenced by InitContainers(), and InitTask().

◆ kusSysId

const uint16_t CbmDeviceMonitorReqBmon::kusSysId = 0x90
staticprivate

Constants.

Definition at line 35 of file CbmDeviceMonitorReqBmon.h.

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


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