CbmRoot
CbmDeviceMonitorTof Class Reference

#include <CbmDeviceMonitorTof.h>

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

Public Member Functions

 CbmDeviceMonitorTof ()
 
virtual ~CbmDeviceMonitorTof ()
 

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 fbDebugMonitorMode
 Ignore Overlap Ms: all fuOverlapMsNb MS at the end of timeslice. More...
 
Bool_t fbIgnoreCriticalErrors
 Switch ON the filling of a additional set of histograms. More...
 
Bool_t fbComponentsAddedToList = kFALSE
 If ON not printout at all for critical errors. More...
 
std::string fsChannelNameDataInput = "tofcomponent"
 User settings parameters. More...
 
std::string fsChannelNameHistosInput = "histogram-in"
 
std::string fsChannelNameHistosConfig = "histo-conf"
 
std::string fsChannelNameCanvasConfig = "canvas-conf"
 
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
 
std::vector< std::string > fsAllowedChannels = {fsChannelNameDataInput}
 List of MQ channels names. More...
 
TList * fParCList = nullptr
 Parameters management. More...
 
uint64_t fulNumMessages = 0
 Statistics & first TS rejection. More...
 
uint64_t fulTsCounter = 0
 
std::chrono::system_clock::time_point fLastPublishTime
 
CbmMcbm2018MonitorAlgoToffMonitorAlgo
 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 kusSysIdTof = 0x60
 Constants. More...
 
static const uint16_t kusSysIdT0 = 0x90
 

Detailed Description

Definition at line 26 of file CbmDeviceMonitorTof.h.

Constructor & Destructor Documentation

◆ CbmDeviceMonitorTof()

CbmDeviceMonitorTof::CbmDeviceMonitorTof ( )

Definition at line 44 of file CbmDeviceMonitorTof.cxx.

◆ ~CbmDeviceMonitorTof()

CbmDeviceMonitorTof::~CbmDeviceMonitorTof ( )
virtual

Definition at line 320 of file CbmDeviceMonitorTof.cxx.

Member Function Documentation

◆ DoUnpack()

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

◆ Finish()

void CbmDeviceMonitorTof::Finish ( )
private

Definition at line 360 of file CbmDeviceMonitorTof.cxx.

◆ HandleData()

bool CbmDeviceMonitorTof::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 248 of file CbmDeviceMonitorTof.cxx.

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

Referenced by InitTask().

◆ InitContainers()

Bool_t CbmDeviceMonitorTof::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 125 of file CbmDeviceMonitorTof.cxx.

References CbmMcbm2018MonitorAlgoTof::CreateHistograms(), fArrayHisto, fbDebugMonitorMode, fbIgnoreCriticalErrors, fbIgnoreOverlapMs, fiGdpbIndex, first, fMonitorAlgo, fParCList, fsChannelNameCanvasConfig, fsChannelNameHistosConfig, fuHistoryHistoSize, fuMaxTotPulser, fuMinTotPulser, fvpsCanvasConfig, fvpsHistosFolder, GenerateCanvasConfigString(), CbmStar2019Algo< T >::GetCanvasVector(), CbmStar2019Algo< T >::GetHistoVector(), CbmMcbm2018MonitorAlgoTof::GetParList(), CbmMcbm2018MonitorAlgoTof::InitContainers(), CbmMcbm2018MonitorAlgoTof::SetDebugMonitorMode(), CbmMcbm2018MonitorAlgoTof::SetGdpbIndex(), CbmMcbm2018MonitorAlgoTof::SetHistoryHistoSize(), CbmMcbm2018MonitorAlgoTof::SetIgnoreCriticalErrors(), CbmStar2019Algo< T >::SetIgnoreOverlapMs(), and CbmMcbm2018MonitorAlgoTof::SetPulserTotLimits().

Referenced by InitTask().

◆ InitTask()

◆ IsChannelNameAllowed()

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

Definition at line 104 of file CbmDeviceMonitorTof.cxx.

References fsAllowedChannels, and pos.

Referenced by InitTask().

◆ SendHistograms()

bool CbmDeviceMonitorTof::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 284 of file CbmDeviceMonitorTof.cxx.

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

Referenced by HandleData().

Member Data Documentation

◆ fArrayHisto

TObjArray CbmDeviceMonitorTof::fArrayHisto = {}
private

Array of histograms to send to the histogram server.

Definition at line 78 of file CbmDeviceMonitorTof.h.

Referenced by InitContainers(), and SendHistograms().

◆ fbComponentsAddedToList

Bool_t CbmDeviceMonitorTof::fbComponentsAddedToList = kFALSE
private

If ON not printout at all for critical errors.

Definition at line 47 of file CbmDeviceMonitorTof.h.

Referenced by DoUnpack().

◆ fbDebugMonitorMode

Bool_t CbmDeviceMonitorTof::fbDebugMonitorMode
private
Initial value:
=
kFALSE

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

Definition at line 43 of file CbmDeviceMonitorTof.h.

Referenced by InitContainers(), and InitTask().

◆ fbIgnoreCriticalErrors

Bool_t CbmDeviceMonitorTof::fbIgnoreCriticalErrors
private
Initial value:
=
kTRUE

Switch ON the filling of a additional set of histograms.

Definition at line 45 of file CbmDeviceMonitorTof.h.

Referenced by InitContainers(), and InitTask().

◆ fbIgnoreOverlapMs

Bool_t CbmDeviceMonitorTof::fbIgnoreOverlapMs
private
Initial value:
=
kFALSE

Control flags.

Definition at line 41 of file CbmDeviceMonitorTof.h.

Referenced by InitContainers(), and InitTask().

◆ fdMaxPublishTime

double_t CbmDeviceMonitorTof::fdMaxPublishTime = 5.0
private

Definition at line 60 of file CbmDeviceMonitorTof.h.

Referenced by HandleData(), and InitTask().

◆ fdMinPublishTime

double_t CbmDeviceMonitorTof::fdMinPublishTime = 0.5
private

Definition at line 59 of file CbmDeviceMonitorTof.h.

Referenced by HandleData(), and InitTask().

◆ fiGdpbIndex

int32_t CbmDeviceMonitorTof::fiGdpbIndex = -1
private

Definition at line 57 of file CbmDeviceMonitorTof.h.

Referenced by InitContainers(), and InitTask().

◆ fLastPublishTime

std::chrono::system_clock::time_point CbmDeviceMonitorTof::fLastPublishTime
private
Initial value:
=
std::chrono::system_clock::now()

Definition at line 71 of file CbmDeviceMonitorTof.h.

Referenced by HandleData().

◆ fMonitorAlgo

CbmMcbm2018MonitorAlgoTof* CbmDeviceMonitorTof::fMonitorAlgo
private

Processing algo.

Definition at line 75 of file CbmDeviceMonitorTof.h.

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

◆ fParCList

TList* CbmDeviceMonitorTof::fParCList = nullptr
private

Parameters management.

Definition at line 66 of file CbmDeviceMonitorTof.h.

Referenced by InitContainers().

◆ fsAllowedChannels

std::vector<std::string> CbmDeviceMonitorTof::fsAllowedChannels = {fsChannelNameDataInput}
private

List of MQ channels names.

Definition at line 63 of file CbmDeviceMonitorTof.h.

Referenced by InitTask(), and IsChannelNameAllowed().

◆ fsChannelNameCanvasConfig

std::string CbmDeviceMonitorTof::fsChannelNameCanvasConfig = "canvas-conf"
private

Definition at line 53 of file CbmDeviceMonitorTof.h.

Referenced by InitContainers(), and InitTask().

◆ fsChannelNameDataInput

std::string CbmDeviceMonitorTof::fsChannelNameDataInput = "tofcomponent"
private

User settings parameters.

Definition at line 50 of file CbmDeviceMonitorTof.h.

Referenced by InitTask().

◆ fsChannelNameHistosConfig

std::string CbmDeviceMonitorTof::fsChannelNameHistosConfig = "histo-conf"
private

Definition at line 52 of file CbmDeviceMonitorTof.h.

Referenced by InitContainers(), and InitTask().

◆ fsChannelNameHistosInput

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

Definition at line 51 of file CbmDeviceMonitorTof.h.

Referenced by InitTask(), and SendHistograms().

◆ fuHistoryHistoSize

uint32_t CbmDeviceMonitorTof::fuHistoryHistoSize = 3600
private

Definition at line 54 of file CbmDeviceMonitorTof.h.

Referenced by InitContainers(), and InitTask().

◆ fulNumMessages

uint64_t CbmDeviceMonitorTof::fulNumMessages = 0
private

Statistics & first TS rejection.

Definition at line 69 of file CbmDeviceMonitorTof.h.

Referenced by HandleData().

◆ fulTsCounter

uint64_t CbmDeviceMonitorTof::fulTsCounter = 0
private

Definition at line 70 of file CbmDeviceMonitorTof.h.

Referenced by DoUnpack().

◆ fuMaxTotPulser

uint32_t CbmDeviceMonitorTof::fuMaxTotPulser = 195
private

Definition at line 56 of file CbmDeviceMonitorTof.h.

Referenced by InitContainers(), and InitTask().

◆ fuMinTotPulser

uint32_t CbmDeviceMonitorTof::fuMinTotPulser = 185
private

Definition at line 55 of file CbmDeviceMonitorTof.h.

Referenced by InitContainers(), and InitTask().

◆ fuPublishFreqTs

uint32_t CbmDeviceMonitorTof::fuPublishFreqTs = 100
private

Definition at line 58 of file CbmDeviceMonitorTof.h.

Referenced by HandleData(), and InitTask().

◆ fvpsCanvasConfig

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

Referenced by InitContainers().

◆ fvpsHistosFolder

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

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

Definition at line 80 of file CbmDeviceMonitorTof.h.

Referenced by InitContainers().

◆ kusSysIdT0

const uint16_t CbmDeviceMonitorTof::kusSysIdT0 = 0x90
staticprivate

Definition at line 38 of file CbmDeviceMonitorTof.h.

Referenced by DoUnpack().

◆ kusSysIdTof

const uint16_t CbmDeviceMonitorTof::kusSysIdTof = 0x60
staticprivate

Constants.

Definition at line 37 of file CbmDeviceMonitorTof.h.

Referenced by DoUnpack().


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