CbmRoot
|
#include <CbmDeviceMonitorReqTof.h>
Public Member Functions | |
CbmDeviceMonitorReqTof () | |
virtual | ~CbmDeviceMonitorReqTof () |
Protected Member Functions | |
virtual void | InitTask () |
virtual bool | ConditionalRun () |
Private Member Functions | |
bool | InitContainers () |
bool | InitHistograms () |
Bool_t | DoUnpack (const fles::Timeslice &ts, size_t component) |
void | Finish () |
bool | SendHistoConfAndData () |
bool | SendHistograms () |
Private Attributes | |
Bool_t | fbIgnoreOverlapMs = kFALSE |
Control flags. | |
Bool_t | fbDebugMonitorMode = kFALSE |
Ignore Overlap Ms: all fuOverlapMsNb MS at the end of timeslice. | |
Bool_t | fbIgnoreCriticalErrors = kTRUE |
Switch ON the filling of a additional set of histograms. | |
Bool_t | fbComponentsAddedToList = kFALSE |
If ON not printout at all for critical errors. | |
std::string | fsChannelNameDataInput = "ts-request" |
User settings parameters. | |
std::string | fsTsBlockName = "t0tofblock" |
std::string | fsChannelNameHistosInput = "histogram-in" |
uint32_t | fuHistoryHistoSize = 3600 |
uint32_t | fuMinTotPulser = 185 |
uint32_t | fuMaxTotPulser = 195 |
int32_t | fiGdpbIndex = -1 |
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() |
CbmMcbm2018MonitorAlgoTof * | fMonitorAlgo |
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 | kusSysIdTof = 0x60 |
Constants. | |
static const uint16_t | kusSysIdBmon = 0x90 |
Definition at line 24 of file CbmDeviceMonitorReqTof.h.
CbmDeviceMonitorReqTof::CbmDeviceMonitorReqTof | ( | ) |
Definition at line 39 of file CbmDeviceMonitorReqTof.cxx.
|
virtual |
Definition at line 312 of file CbmDeviceMonitorReqTof.cxx.
|
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
Process received message
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 172 of file CbmDeviceMonitorReqTof.cxx.
References DoUnpack(), fbConfigSent, fdMaxPublishTime, fdMinPublishTime, fLastPublishTime, fsChannelNameDataInput, fsTsBlockName, fulNumMessages, fuPublishFreqTs, InitContainers(), InitHistograms(), kusSysIdTof, SendHistoConfAndData(), and SendHistograms().
|
private |
Clear the digis vector in case it was filled
Definition at line 315 of file CbmDeviceMonitorReqTof.cxx.
References CbmMcbm2018MonitorAlgoTof::AddMsComponentToList(), CbmStar2019Algo< T >::ClearVector(), fbComponentsAddedToList, fMonitorAlgo, fulTsCounter, kusSysIdBmon, kusSysIdTof, and CbmMcbm2018MonitorAlgoTof::ProcessTs().
Referenced by ConditionalRun().
|
private |
Definition at line 344 of file CbmDeviceMonitorReqTof.cxx.
|
private |
Need to add accessors for all options
Definition at line 74 of file CbmDeviceMonitorReqTof.cxx.
References fbDebugMonitorMode, fbIgnoreCriticalErrors, fbIgnoreOverlapMs, fiGdpbIndex, fMonitorAlgo, fParCList, fuHistoryHistoSize, fuMaxTotPulser, fuMinTotPulser, CbmMcbm2018MonitorAlgoTof::GetParList(), CbmMcbm2018MonitorAlgoTof::InitContainers(), CbmMcbm2018MonitorAlgoTof::SetDebugMonitorMode(), CbmMcbm2018MonitorAlgoTof::SetGdpbIndex(), CbmMcbm2018MonitorAlgoTof::SetHistoryHistoSize(), CbmMcbm2018MonitorAlgoTof::SetIgnoreCriticalErrors(), CbmStar2019Algo< T >::SetIgnoreOverlapMs(), and CbmMcbm2018MonitorAlgoTof::SetPulserTotLimits().
Referenced by ConditionalRun().
|
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 126 of file CbmDeviceMonitorReqTof.cxx.
References CbmMcbm2018MonitorAlgoTof::CreateHistograms(), fArrayHisto, first, fMonitorAlgo, fvpsCanvasConfig, fvpsHistosFolder, GenerateCanvasConfigString(), CbmStar2019Algo< T >::GetCanvasVector(), and CbmStar2019Algo< T >::GetHistoVector().
Referenced by ConditionalRun().
|
protectedvirtual |
Read options from executable
Set the Monitor Algo in Absolute time scale
Definition at line 41 of file CbmDeviceMonitorReqTof.cxx.
References fbDebugMonitorMode, fbIgnoreCriticalErrors, fbIgnoreOverlapMs, fdMaxPublishTime, fdMinPublishTime, fiGdpbIndex, fMonitorAlgo, fsChannelNameDataInput, fsChannelNameHistosInput, fsTsBlockName, fuHistoryHistoSize, fuMaxTotPulser, fuMinTotPulser, fuPublishFreqTs, and CbmMcbm2018MonitorAlgoTof::UseAbsoluteTime().
|
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 244 of file CbmDeviceMonitorReqTof.cxx.
References fArrayHisto, fMonitorAlgo, fsChannelNameHistosInput, fvpsCanvasConfig, fvpsHistosFolder, and CbmMcbm2018MonitorAlgoTof::ResetHistograms().
Referenced by ConditionalRun().
|
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 292 of file CbmDeviceMonitorReqTof.cxx.
References fArrayHisto, fMonitorAlgo, fsChannelNameHistosInput, and CbmMcbm2018MonitorAlgoTof::ResetHistograms().
Referenced by ConditionalRun().
|
private |
Array of histograms to send to the histogram server.
Definition at line 68 of file CbmDeviceMonitorReqTof.h.
Referenced by InitHistograms(), SendHistoConfAndData(), and SendHistograms().
|
private |
If ON not printout at all for critical errors.
Definition at line 42 of file CbmDeviceMonitorReqTof.h.
Referenced by DoUnpack().
|
private |
Flag indicating whether the histograms and canvases configurations were already published.
Definition at line 76 of file CbmDeviceMonitorReqTof.h.
Referenced by ConditionalRun().
|
private |
Ignore Overlap Ms: all fuOverlapMsNb MS at the end of timeslice.
Definition at line 40 of file CbmDeviceMonitorReqTof.h.
Referenced by InitContainers(), and InitTask().
|
private |
Switch ON the filling of a additional set of histograms.
Definition at line 41 of file CbmDeviceMonitorReqTof.h.
Referenced by InitContainers(), and InitTask().
|
private |
Control flags.
Definition at line 39 of file CbmDeviceMonitorReqTof.h.
Referenced by InitContainers(), and InitTask().
|
private |
Definition at line 54 of file CbmDeviceMonitorReqTof.h.
Referenced by ConditionalRun(), and InitTask().
|
private |
Definition at line 53 of file CbmDeviceMonitorReqTof.h.
Referenced by ConditionalRun(), and InitTask().
|
private |
Definition at line 51 of file CbmDeviceMonitorReqTof.h.
Referenced by InitContainers(), and InitTask().
|
private |
Definition at line 62 of file CbmDeviceMonitorReqTof.h.
Referenced by ConditionalRun().
|
private |
Processing algo.
Definition at line 65 of file CbmDeviceMonitorReqTof.h.
Referenced by DoUnpack(), InitContainers(), InitHistograms(), InitTask(), SendHistoConfAndData(), and SendHistograms().
|
private |
Parameters management.
Definition at line 57 of file CbmDeviceMonitorReqTof.h.
Referenced by InitContainers().
|
private |
User settings parameters.
Definition at line 45 of file CbmDeviceMonitorReqTof.h.
Referenced by ConditionalRun(), and InitTask().
|
private |
Definition at line 47 of file CbmDeviceMonitorReqTof.h.
Referenced by InitTask(), SendHistoConfAndData(), and SendHistograms().
|
private |
Definition at line 46 of file CbmDeviceMonitorReqTof.h.
Referenced by ConditionalRun(), and InitTask().
|
private |
Definition at line 48 of file CbmDeviceMonitorReqTof.h.
Referenced by InitContainers(), and InitTask().
|
private |
Statistics & first TS rejection.
Definition at line 60 of file CbmDeviceMonitorReqTof.h.
Referenced by ConditionalRun().
|
private |
Definition at line 61 of file CbmDeviceMonitorReqTof.h.
Referenced by DoUnpack().
|
private |
Definition at line 50 of file CbmDeviceMonitorReqTof.h.
Referenced by InitContainers(), and InitTask().
|
private |
Definition at line 49 of file CbmDeviceMonitorReqTof.h.
Referenced by InitContainers(), and InitTask().
|
private |
Definition at line 52 of file CbmDeviceMonitorReqTof.h.
Referenced by ConditionalRun(), and InitTask().
|
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 CbmDeviceMonitorReqTof.h.
Referenced by InitHistograms(), and SendHistoConfAndData().
|
private |
Vector of string pairs with ( HistoName, FolderPath ) to send to the histogram server.
Definition at line 70 of file CbmDeviceMonitorReqTof.h.
Referenced by InitHistograms(), and SendHistoConfAndData().
|
staticprivate |
Definition at line 36 of file CbmDeviceMonitorReqTof.h.
Referenced by DoUnpack().
|
staticprivate |
Constants.
Definition at line 35 of file CbmDeviceMonitorReqTof.h.
Referenced by ConditionalRun(), and DoUnpack().