CbmRoot
Loading...
Searching...
No Matches
cbm::algo::ca::TrackingMonitor Class Reference

A monitor specialization for cbm::algo::ca::Framework class. More...

#include <CaTrackingMonitor.h>

Inheritance diagram for cbm::algo::ca::TrackingMonitor:
[legend]
Collaboration diagram for cbm::algo::ca::TrackingMonitor:
[legend]

Public Types

using CounterArray
 Alias to array, indexed by the monitorable enumeration.
 
using TimerArray
 Alias to array, indexed by the timer enumeration.
 

Public Member Functions

 TrackingMonitor ()
 Default constructor.
 
void AddMonitorData (const MonitorData< ECounter, ETimer > &data, bool parallel=false)
 Adds the other monitor data to this.
 
const std::string & GetCounterName (ECounter key) const
 Gets counter name.
 
int GetCounterValue (ECounter key) const
 Gets counter value.
 
const MonitorData< ECounter, ETimer > & GetMonitorData () const
 Gets monitor data.
 
const std::string & GetName () const
 Gets name of the monitor.
 
const TimerGetTimer (ETimer key) const
 Gets timer.
 
const std::string & GetTimerName (ETimer key) const
 Gets timer name.
 
void IncrementCounter (ECounter key)
 Increments key counter by 1.
 
void IncrementCounter (ECounter key, int num)
 Increments key counter by a number.
 
void Reset ()
 Resets the counters.
 
void SetRatioKeys (const std::vector< ECounter > &vKeys)
 Sets keys of counters, which are used as denominators for ratios.
 
void SetCounterName (ECounter key, std::string_view name)
 Sets name of counter.
 
void SetMonitorData (const MonitorData< ECounter, ETimer > &data)
 Sets monitor data.
 
void SetName (std::string_view name)
 Sets name of the monitor.
 
void SetTimerName (ETimer key, std::string_view name)
 Sets name of the timer.
 
void StartTimer (ETimer key)
 Starts timer.
 
void StopTimer (ETimer key)
 Stops timer.
 
std::string ToString () const
 Prints counters summary to string.
 

Private Member Functions

template<typename Archive >
void serialize (Archive &ar, const unsigned int)
 

Private Attributes

MonitorData< ECounter, ETimerfMonitorData
 Monitor data.
 
TimerArray< std::string > faTimerNames
 Array of timer names.
 
CounterArray< std::string > faCounterNames
 Array of counter names.
 
std::vector< ECounterfvCounterRatioKeys
 List of keys, which are used as denominators in ratios.
 
std::string fsName
 Name of the monitor.
 

Friends

class boost::serialization::access
 

Detailed Description

A monitor specialization for cbm::algo::ca::Framework class.

Member Typedef Documentation

◆ CounterArray

using cbm::algo::ca::Monitor< ECounter, ETimer >::CounterArray
inherited

Alias to array, indexed by the monitorable enumeration.

Definition at line 39 of file CaMonitor.h.

◆ TimerArray

using cbm::algo::ca::Monitor< ECounter, ETimer >::TimerArray
inherited

Alias to array, indexed by the timer enumeration.

Definition at line 43 of file CaMonitor.h.

Constructor & Destructor Documentation

◆ TrackingMonitor()

Member Function Documentation

◆ AddMonitorData()

void cbm::algo::ca::Monitor< ECounter, ETimer >::AddMonitorData ( const MonitorData< ECounter, ETimer > & data,
bool parallel = false )
inlineinherited

Adds the other monitor data to this.

Parameters
dataReference to the other MonitorData object to add
parallelTrue, if the monitor data were obtained in parallel (See Timer::AddMonitorData)

Definition at line 70 of file CaMonitor.h.

◆ GetCounterName()

const std::string & cbm::algo::ca::Monitor< ECounter, ETimer >::GetCounterName ( ECounter key) const
inlineinherited

Gets counter name.

Parameters
keyCounter key

Definition at line 77 of file CaMonitor.h.

◆ GetCounterValue()

int cbm::algo::ca::Monitor< ECounter, ETimer >::GetCounterValue ( ECounter key) const
inlineinherited

Gets counter value.

Parameters
key

Definition at line 81 of file CaMonitor.h.

◆ GetMonitorData()

const MonitorData< ECounter, ETimer > & cbm::algo::ca::Monitor< ECounter, ETimer >::GetMonitorData ( ) const
inlineinherited

Gets monitor data.

Definition at line 84 of file CaMonitor.h.

◆ GetName()

const std::string & cbm::algo::ca::Monitor< ECounter, ETimer >::GetName ( ) const
inlineinherited

Gets name of the monitor.

Definition at line 87 of file CaMonitor.h.

◆ GetTimer()

const Timer & cbm::algo::ca::Monitor< ECounter, ETimer >::GetTimer ( ETimer key) const
inlineinherited

Gets timer.

Parameters
keyTimer key

Definition at line 91 of file CaMonitor.h.

◆ GetTimerName()

const std::string & cbm::algo::ca::Monitor< ECounter, ETimer >::GetTimerName ( ETimer key) const
inlineinherited

Gets timer name.

Parameters
keyTimer key

Definition at line 95 of file CaMonitor.h.

◆ IncrementCounter() [1/2]

void cbm::algo::ca::Monitor< ECounter, ETimer >::IncrementCounter ( ECounter key)
inlineinherited

Increments key counter by 1.

Parameters
keyCounter key

Definition at line 99 of file CaMonitor.h.

◆ IncrementCounter() [2/2]

void cbm::algo::ca::Monitor< ECounter, ETimer >::IncrementCounter ( ECounter key,
int num )
inlineinherited

Increments key counter by a number.

Parameters
keyCounter key
numNumber to add

Definition at line 104 of file CaMonitor.h.

◆ Reset()

void cbm::algo::ca::Monitor< ECounter, ETimer >::Reset ( )
inlineinherited

Resets the counters.

Definition at line 107 of file CaMonitor.h.

◆ serialize()

template<typename Archive >
void cbm::algo::ca::TrackingMonitor::serialize ( Archive & ar,
const unsigned int  )
inlineprivate

Definition at line 131 of file CaTrackingMonitor.h.

◆ SetCounterName()

void cbm::algo::ca::Monitor< ECounter, ETimer >::SetCounterName ( ECounter key,
std::string_view name )
inlineinherited

Sets name of counter.

Parameters
nameName of counter

Definition at line 115 of file CaMonitor.h.

Referenced by TrackingMonitor().

◆ SetMonitorData()

void cbm::algo::ca::Monitor< ECounter, ETimer >::SetMonitorData ( const MonitorData< ECounter, ETimer > & data)
inlineinherited

Sets monitor data.

Parameters
dataThe MonitorData class objet

Definition at line 119 of file CaMonitor.h.

◆ SetName()

void cbm::algo::ca::Monitor< ECounter, ETimer >::SetName ( std::string_view name)
inlineinherited

Sets name of the monitor.

Parameters
nameName of the monitor

Definition at line 123 of file CaMonitor.h.

◆ SetRatioKeys()

void cbm::algo::ca::Monitor< ECounter, ETimer >::SetRatioKeys ( const std::vector< ECounter > & vKeys)
inlineinherited

Sets keys of counters, which are used as denominators for ratios.

Parameters
vKeysVector of keys

Definition at line 111 of file CaMonitor.h.

Referenced by TrackingMonitor().

◆ SetTimerName()

void cbm::algo::ca::Monitor< ECounter, ETimer >::SetTimerName ( ETimer key,
std::string_view name )
inlineinherited

Sets name of the timer.

Parameters
nameName of the timer

Definition at line 127 of file CaMonitor.h.

Referenced by TrackingMonitor().

◆ StartTimer()

void cbm::algo::ca::Monitor< ECounter, ETimer >::StartTimer ( ETimer key)
inlineinherited

Starts timer.

Parameters
keyTimer key

Definition at line 131 of file CaMonitor.h.

◆ StopTimer()

void cbm::algo::ca::Monitor< ECounter, ETimer >::StopTimer ( ETimer key)
inlineinherited

Stops timer.

Parameters
keyTimer key

Definition at line 135 of file CaMonitor.h.

◆ ToString()

std::string cbm::algo::ca::Monitor< ECounter, ETimer >::ToString ( ) const
inherited

Prints counters summary to string.

Definition at line 138 of file CaMonitor.h.

Friends And Related Symbol Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 129 of file CaTrackingMonitor.h.

Member Data Documentation

◆ faCounterNames

CounterArray<std::string> cbm::algo::ca::Monitor< ECounter, ETimer >::faCounterNames
privateinherited

Array of counter names.

Definition at line 154 of file CaMonitor.h.

◆ faTimerNames

TimerArray<std::string> cbm::algo::ca::Monitor< ECounter, ETimer >::faTimerNames
privateinherited

Array of timer names.

Definition at line 153 of file CaMonitor.h.

◆ fMonitorData

MonitorData<ECounter, ETimer> cbm::algo::ca::Monitor< ECounter, ETimer >::fMonitorData
privateinherited

Monitor data.

Definition at line 152 of file CaMonitor.h.

◆ fsName

std::string cbm::algo::ca::Monitor< ECounter, ETimer >::fsName
privateinherited

Name of the monitor.

Definition at line 156 of file CaMonitor.h.

◆ fvCounterRatioKeys

std::vector<ECounter> cbm::algo::ca::Monitor< ECounter, ETimer >::fvCounterRatioKeys
privateinherited

List of keys, which are used as denominators in ratios.

Definition at line 155 of file CaMonitor.h.


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