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

#include <CbmDeviceMonitorPsd.h>

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

Public Member Functions

 CbmDeviceMonitorPsd ()
 
virtual ~CbmDeviceMonitorPsd ()
 

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 fbComponentsAddedToList = kFALSE
 
Bool_t fbMonitorMode
 Control flags.
 
Bool_t fbIgnoreOverlapMs
 Switch ON the filling of a minimal set of histograms.
 
Bool_t fbMonitorChanMode
 Ignore Overlap Ms: all fuOverlapMsNb MS at the end of timeslice.
 
Bool_t fbMonitorWfmMode
 Switch ON the filling channelwise histograms.
 
Bool_t fbMonitorFitMode
 Switch ON the filling waveforms histograms.
 
std::string fsChannelNameDataInput
 Switch ON the filling waveform fitting histograms.
 
std::string fsChannelNameHistosInput
 
std::string fsChannelNameHistosConfig
 
std::string fsChannelNameCanvasConfig
 
uint32_t fuPublishFreqTs
 
double_t fdMinPublishTime
 
double_t fdMaxPublishTime
 
UInt_t fuHistoryHistoSize
 
std::vector< Int_t > fviHistoChargeArgs
 
std::vector< Int_t > fviHistoAmplArgs
 
std::vector< Int_t > fviHistoZLArgs
 
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
 
CbmMcbm2018MonitorAlgoPsdfMonitorAlgo
 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
 

Static Private Attributes

static const uint16_t kusSysId = 0x80
 Constants.
 

Detailed Description

Definition at line 32 of file CbmDeviceMonitorPsd.h.

Constructor & Destructor Documentation

◆ CbmDeviceMonitorPsd()

CbmDeviceMonitorPsd::CbmDeviceMonitorPsd ( )

Definition at line 47 of file CbmDeviceMonitorPsd.cxx.

◆ ~CbmDeviceMonitorPsd()

CbmDeviceMonitorPsd::~CbmDeviceMonitorPsd ( )
virtual

Definition at line 317 of file CbmDeviceMonitorPsd.cxx.

Member Function Documentation

◆ DoUnpack()

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

◆ Finish()

void CbmDeviceMonitorPsd::Finish ( )
private

Definition at line 346 of file CbmDeviceMonitorPsd.cxx.

◆ HandleData()

bool CbmDeviceMonitorPsd::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 265 of file CbmDeviceMonitorPsd.cxx.

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

Referenced by InitTask().

◆ InitContainers()

Bool_t CbmDeviceMonitorPsd::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 143 of file CbmDeviceMonitorPsd.cxx.

References CbmMcbm2018MonitorAlgoPsd::CreateHistograms(), fArrayHisto, fbIgnoreOverlapMs, fbMonitorChanMode, fbMonitorFitMode, fbMonitorMode, fbMonitorWfmMode, first, fMonitorAlgo, fParCList, fsChannelNameCanvasConfig, fsChannelNameHistosConfig, fuHistoryHistoSize, fviHistoAmplArgs, fviHistoChargeArgs, fviHistoZLArgs, fvpsCanvasConfig, fvpsHistosFolder, GenerateCanvasConfigString(), CbmStar2019Algo< T >::GetCanvasVector(), CbmStar2019Algo< T >::GetHistoVector(), CbmMcbm2018MonitorAlgoPsd::GetParList(), CbmMcbm2018MonitorAlgoPsd::InitContainers(), CbmMcbm2018MonitorAlgoPsd::SetAmplHistoArgs(), CbmMcbm2018MonitorAlgoPsd::SetChargeHistoArgs(), CbmMcbm2018MonitorAlgoPsd::SetHistoryHistoSize(), CbmStar2019Algo< T >::SetIgnoreOverlapMs(), CbmMcbm2018MonitorAlgoPsd::SetMonitorChanMode(), CbmMcbm2018MonitorAlgoPsd::SetMonitorFitMode(), CbmMcbm2018MonitorAlgoPsd::SetMonitorMode(), CbmMcbm2018MonitorAlgoPsd::SetMonitorWfmMode(), and CbmMcbm2018MonitorAlgoPsd::SetZLHistoArgs().

Referenced by InitTask().

◆ InitTask()

◆ IsChannelNameAllowed()

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

Definition at line 125 of file CbmDeviceMonitorPsd.cxx.

References fsAllowedChannels, and pos.

Referenced by InitTask().

◆ SendHistograms()

bool CbmDeviceMonitorPsd::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 CbmDeviceMonitorPsd.cxx.

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

Referenced by HandleData().

Member Data Documentation

◆ fArrayHisto

TObjArray CbmDeviceMonitorPsd::fArrayHisto
private

Array of histograms to send to the histogram server.

Definition at line 84 of file CbmDeviceMonitorPsd.h.

Referenced by InitContainers(), and SendHistograms().

◆ fbComponentsAddedToList

Bool_t CbmDeviceMonitorPsd::fbComponentsAddedToList = kFALSE
private

Definition at line 44 of file CbmDeviceMonitorPsd.h.

Referenced by DoUnpack().

◆ fbIgnoreOverlapMs

Bool_t CbmDeviceMonitorPsd::fbIgnoreOverlapMs
private

Switch ON the filling of a minimal set of histograms.

Definition at line 48 of file CbmDeviceMonitorPsd.h.

Referenced by InitContainers(), and InitTask().

◆ fbMonitorChanMode

Bool_t CbmDeviceMonitorPsd::fbMonitorChanMode
private

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

Definition at line 49 of file CbmDeviceMonitorPsd.h.

Referenced by InitContainers(), and InitTask().

◆ fbMonitorFitMode

Bool_t CbmDeviceMonitorPsd::fbMonitorFitMode
private

Switch ON the filling waveforms histograms.

Definition at line 51 of file CbmDeviceMonitorPsd.h.

Referenced by InitContainers(), and InitTask().

◆ fbMonitorMode

Bool_t CbmDeviceMonitorPsd::fbMonitorMode
private

Control flags.

Definition at line 47 of file CbmDeviceMonitorPsd.h.

Referenced by InitContainers(), and InitTask().

◆ fbMonitorWfmMode

Bool_t CbmDeviceMonitorPsd::fbMonitorWfmMode
private

Switch ON the filling channelwise histograms.

Definition at line 50 of file CbmDeviceMonitorPsd.h.

Referenced by InitContainers(), and InitTask().

◆ fdMaxPublishTime

double_t CbmDeviceMonitorPsd::fdMaxPublishTime
private

Definition at line 61 of file CbmDeviceMonitorPsd.h.

Referenced by HandleData(), and InitTask().

◆ fdMinPublishTime

double_t CbmDeviceMonitorPsd::fdMinPublishTime
private

Definition at line 60 of file CbmDeviceMonitorPsd.h.

Referenced by HandleData(), and InitTask().

◆ fLastPublishTime

std::chrono::system_clock::time_point CbmDeviceMonitorPsd::fLastPublishTime
private

Definition at line 78 of file CbmDeviceMonitorPsd.h.

Referenced by HandleData().

◆ fMonitorAlgo

CbmMcbm2018MonitorAlgoPsd* CbmDeviceMonitorPsd::fMonitorAlgo
private

Processing algo.

Definition at line 81 of file CbmDeviceMonitorPsd.h.

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

◆ fParCList

TList* CbmDeviceMonitorPsd::fParCList
private

Parameters management.

Definition at line 73 of file CbmDeviceMonitorPsd.h.

Referenced by InitContainers().

◆ fsAllowedChannels

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

List of MQ channels names.

ZeroLevel histogram arguments in adc counts

Definition at line 70 of file CbmDeviceMonitorPsd.h.

Referenced by InitTask(), and IsChannelNameAllowed().

◆ fsChannelNameCanvasConfig

std::string CbmDeviceMonitorPsd::fsChannelNameCanvasConfig
private

Definition at line 58 of file CbmDeviceMonitorPsd.h.

Referenced by InitContainers(), and InitTask().

◆ fsChannelNameDataInput

std::string CbmDeviceMonitorPsd::fsChannelNameDataInput
private

Switch ON the filling waveform fitting histograms.

User settings parameters

Definition at line 55 of file CbmDeviceMonitorPsd.h.

Referenced by InitTask().

◆ fsChannelNameHistosConfig

std::string CbmDeviceMonitorPsd::fsChannelNameHistosConfig
private

Definition at line 57 of file CbmDeviceMonitorPsd.h.

Referenced by InitContainers(), and InitTask().

◆ fsChannelNameHistosInput

std::string CbmDeviceMonitorPsd::fsChannelNameHistosInput
private

Definition at line 56 of file CbmDeviceMonitorPsd.h.

Referenced by InitTask(), and SendHistograms().

◆ fuHistoryHistoSize

UInt_t CbmDeviceMonitorPsd::fuHistoryHistoSize
private

Definition at line 63 of file CbmDeviceMonitorPsd.h.

Referenced by InitContainers(), and InitTask().

◆ fulNumMessages

uint64_t CbmDeviceMonitorPsd::fulNumMessages
private

Statistics & first TS rejection.

Definition at line 76 of file CbmDeviceMonitorPsd.h.

Referenced by HandleData().

◆ fulTsCounter

uint64_t CbmDeviceMonitorPsd::fulTsCounter
private

Definition at line 77 of file CbmDeviceMonitorPsd.h.

Referenced by DoUnpack().

◆ fuPublishFreqTs

uint32_t CbmDeviceMonitorPsd::fuPublishFreqTs
private

Definition at line 59 of file CbmDeviceMonitorPsd.h.

Referenced by HandleData(), and InitTask().

◆ fviHistoAmplArgs

std::vector<Int_t> CbmDeviceMonitorPsd::fviHistoAmplArgs
private

Charge histogram arguments in adc counts

Definition at line 65 of file CbmDeviceMonitorPsd.h.

Referenced by InitContainers(), and InitTask().

◆ fviHistoChargeArgs

std::vector<Int_t> CbmDeviceMonitorPsd::fviHistoChargeArgs
private

Definition at line 64 of file CbmDeviceMonitorPsd.h.

Referenced by InitContainers(), and InitTask().

◆ fviHistoZLArgs

std::vector<Int_t> CbmDeviceMonitorPsd::fviHistoZLArgs
private

Amplitude histogram arguments in adc counts

Definition at line 66 of file CbmDeviceMonitorPsd.h.

Referenced by InitContainers(), and InitTask().

◆ fvpsCanvasConfig

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

Referenced by InitContainers().

◆ fvpsHistosFolder

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

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

Definition at line 86 of file CbmDeviceMonitorPsd.h.

Referenced by InitContainers().

◆ kusSysId

const uint16_t CbmDeviceMonitorPsd::kusSysId = 0x80
staticprivate

Constants.

Definition at line 43 of file CbmDeviceMonitorPsd.h.

Referenced by DoUnpack().


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