CbmRoot
Loading...
Searching...
No Matches
cbm::algo::ca::Monitor< ECounterKey, ETimerKey > Class Template Reference

Monitor class for the CA tracking. More...

#include <CaMonitor.h>

Inheritance diagram for cbm::algo::ca::Monitor< ECounterKey, ETimerKey >:
[legend]
Collaboration diagram for cbm::algo::ca::Monitor< ECounterKey, ETimerKey >:
[legend]

Public Types

template<typename T >
using CounterArray = EnumArray<ECounterKey, T>
 Alias to array, indexed by the monitorable enumeration.
 
template<typename T >
using TimerArray = EnumArray<ETimerKey, T>
 Alias to array, indexed by the timer enumeration.
 

Public Member Functions

 Monitor (std::string_view name)
 Constructor.
 
 Monitor ()=default
 Default constructor.
 
 ~Monitor ()=default
 Destructor.
 
 Monitor (const Monitor &)=delete
 Copy constructor.
 
 Monitor (Monitor &&)=delete
 Move constructor.
 
Monitoroperator= (const Monitor &)=delete
 Copy assignment operator.
 
Monitoroperator= (Monitor &&)=delete
 Move assignment operator.
 
void AddMonitorData (const MonitorData< ECounterKey, ETimerKey > &data, bool parallel=false)
 Adds the other monitor data to this.
 
const std::string & GetCounterName (ECounterKey key) const
 Gets counter name.
 
int GetCounterValue (ECounterKey key) const
 Gets counter value.
 
const MonitorData< ECounterKey, ETimerKey > & GetMonitorData () const
 Gets monitor data.
 
const std::string & GetName () const
 Gets name of the monitor.
 
const TimerGetTimer (ETimerKey key) const
 Gets timer.
 
const std::string & GetTimerName (ETimerKey key) const
 Gets timer name.
 
void IncrementCounter (ECounterKey key)
 Increments key counter by 1.
 
void IncrementCounter (ECounterKey key, int num)
 Increments key counter by a number.
 
void Reset ()
 Resets the counters.
 
void SetRatioKeys (const std::vector< ECounterKey > &vKeys)
 Sets keys of counters, which are used as denominators for ratios.
 
void SetCounterName (ECounterKey key, std::string_view name)
 Sets name of counter.
 
void SetMonitorData (const MonitorData< ECounterKey, ETimerKey > &data)
 Sets monitor data.
 
void SetName (std::string_view name)
 Sets name of the monitor.
 
void SetTimerName (ETimerKey key, std::string_view name)
 Sets name of the timer.
 
void StartTimer (ETimerKey key)
 Starts timer.
 
void StopTimer (ETimerKey key)
 Stops timer.
 
std::string ToString () const
 Prints counters summary to string.
 
template<typename Archive >
void serialize (Archive &ar, const unsigned int)
 

Private Attributes

MonitorData< ECounterKey, ETimerKey > fMonitorData
 Monitor data.
 
TimerArray< std::string > faTimerNames {}
 Array of timer names.
 
CounterArray< std::string > faCounterNames {}
 Array of counter names.
 
std::vector< ECounterKey > fvCounterRatioKeys {}
 List of keys, which are used as denominators in ratios.
 
std::string fsName
 Name of the monitor.
 

Friends

class boost::serialization::access
 

Detailed Description

template<class ECounterKey, class ETimerKey = EDummy>
class cbm::algo::ca::Monitor< ECounterKey, ETimerKey >

Monitor class for the CA tracking.

Template Parameters
ECounterKeyA enum class, containing keys for monitorables
ETimerKeyA enum class, containing keys for timers

Definition at line 35 of file CaMonitor.h.

Member Typedef Documentation

◆ CounterArray

template<class ECounterKey , class ETimerKey = EDummy>
template<typename T >
using cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::CounterArray = EnumArray<ECounterKey, T>

Alias to array, indexed by the monitorable enumeration.

Definition at line 39 of file CaMonitor.h.

◆ TimerArray

template<class ECounterKey , class ETimerKey = EDummy>
template<typename T >
using cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::TimerArray = EnumArray<ETimerKey, T>

Alias to array, indexed by the timer enumeration.

Definition at line 43 of file CaMonitor.h.

Constructor & Destructor Documentation

◆ Monitor() [1/4]

template<class ECounterKey , class ETimerKey = EDummy>
cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::Monitor ( std::string_view name)
inline

Constructor.

Parameters
nameName of monitor

Definition at line 47 of file CaMonitor.h.

◆ Monitor() [2/4]

template<class ECounterKey , class ETimerKey = EDummy>
cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::Monitor ( )
default

Default constructor.

◆ ~Monitor()

template<class ECounterKey , class ETimerKey = EDummy>
cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::~Monitor ( )
default

Destructor.

◆ Monitor() [3/4]

template<class ECounterKey , class ETimerKey = EDummy>
cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::Monitor ( const Monitor< ECounterKey, ETimerKey > & )
delete

Copy constructor.

◆ Monitor() [4/4]

template<class ECounterKey , class ETimerKey = EDummy>
cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::Monitor ( Monitor< ECounterKey, ETimerKey > && )
delete

Move constructor.

Member Function Documentation

◆ AddMonitorData()

template<class ECounterKey , class ETimerKey = EDummy>
void cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::AddMonitorData ( const MonitorData< ECounterKey, ETimerKey > & data,
bool parallel = false )
inline

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.

References cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::fMonitorData.

Referenced by cbm::algo::TrackingChain::PrepareOutput(), and CbmL1::Reconstruct().

◆ GetCounterName()

template<class ECounterKey , class ETimerKey = EDummy>
const std::string & cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::GetCounterName ( ECounterKey key) const
inline

Gets counter name.

Parameters
keyCounter key

Definition at line 77 of file CaMonitor.h.

References cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::faCounterNames.

◆ GetCounterValue()

template<class ECounterKey , class ETimerKey = EDummy>
int cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::GetCounterValue ( ECounterKey key) const
inline

Gets counter value.

Parameters
key

Definition at line 81 of file CaMonitor.h.

References cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::fMonitorData.

Referenced by cbm::ca::OutputQa::Check(), and cbm::algo::TrackingChain::PrepareOutput().

◆ GetMonitorData()

template<class ECounterKey , class ETimerKey = EDummy>
const MonitorData< ECounterKey, ETimerKey > & cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::GetMonitorData ( ) const
inline

Gets monitor data.

Definition at line 84 of file CaMonitor.h.

References cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::fMonitorData.

◆ GetName()

template<class ECounterKey , class ETimerKey = EDummy>
const std::string & cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::GetName ( ) const
inline

Gets name of the monitor.

Definition at line 87 of file CaMonitor.h.

References cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::fsName.

◆ GetTimer()

template<class ECounterKey , class ETimerKey = EDummy>
const Timer & cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::GetTimer ( ETimerKey key) const
inline

Gets timer.

Parameters
keyTimer key

Definition at line 91 of file CaMonitor.h.

References cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::fMonitorData.

◆ GetTimerName()

template<class ECounterKey , class ETimerKey = EDummy>
const std::string & cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::GetTimerName ( ETimerKey key) const
inline

Gets timer name.

Parameters
keyTimer key

Definition at line 95 of file CaMonitor.h.

References cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::faTimerNames.

◆ IncrementCounter() [1/2]

template<class ECounterKey , class ETimerKey = EDummy>
void cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::IncrementCounter ( ECounterKey key)
inline

◆ IncrementCounter() [2/2]

template<class ECounterKey , class ETimerKey = EDummy>
void cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::IncrementCounter ( ECounterKey key,
int num )
inline

Increments key counter by a number.

Parameters
keyCounter key
numNumber to add

Definition at line 104 of file CaMonitor.h.

References cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::fMonitorData.

◆ operator=() [1/2]

template<class ECounterKey , class ETimerKey = EDummy>
Monitor & cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::operator= ( const Monitor< ECounterKey, ETimerKey > & )
delete

Copy assignment operator.

◆ operator=() [2/2]

template<class ECounterKey , class ETimerKey = EDummy>
Monitor & cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::operator= ( Monitor< ECounterKey, ETimerKey > && )
delete

Move assignment operator.

◆ Reset()

template<class ECounterKey , class ETimerKey = EDummy>
void cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::Reset ( )
inline

Resets the counters.

Definition at line 107 of file CaMonitor.h.

References cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::fMonitorData.

Referenced by cbm::algo::TrackingChain::Init(), and CbmL1::Init().

◆ serialize()

◆ SetCounterName()

template<class ECounterKey , class ETimerKey = EDummy>
void cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::SetCounterName ( ECounterKey key,
std::string_view name )
inline

Sets name of counter.

Parameters
nameName of counter

Definition at line 115 of file CaMonitor.h.

References cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::faCounterNames.

Referenced by cbm::ca::OutputQa::InitQa(), and cbm::ca::MCModule::InitRun().

◆ SetMonitorData()

template<class ECounterKey , class ETimerKey = EDummy>
void cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::SetMonitorData ( const MonitorData< ECounterKey, ETimerKey > & data)
inline

Sets monitor data.

Parameters
dataThe MonitorData class objet

Definition at line 119 of file CaMonitor.h.

References cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::fMonitorData.

◆ SetName()

template<class ECounterKey , class ETimerKey = EDummy>
void cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::SetName ( std::string_view name)
inline

Sets name of the monitor.

Parameters
nameName of the monitor

Definition at line 123 of file CaMonitor.h.

References cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::fsName.

◆ SetRatioKeys()

template<class ECounterKey , class ETimerKey = EDummy>
void cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::SetRatioKeys ( const std::vector< ECounterKey > & vKeys)
inline

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

Parameters
vKeysVector of keys

Definition at line 111 of file CaMonitor.h.

References cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::fvCounterRatioKeys.

Referenced by cbm::ca::OutputQa::InitQa(), and cbm::ca::MCModule::InitRun().

◆ SetTimerName()

template<class ECounterKey , class ETimerKey = EDummy>
void cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::SetTimerName ( ETimerKey key,
std::string_view name )
inline

Sets name of the timer.

Parameters
nameName of the timer

Definition at line 127 of file CaMonitor.h.

References cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::faTimerNames.

◆ StartTimer()

template<class ECounterKey , class ETimerKey = EDummy>
void cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::StartTimer ( ETimerKey key)
inline

Starts timer.

Parameters
keyTimer key

Definition at line 131 of file CaMonitor.h.

References cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::fMonitorData.

◆ StopTimer()

template<class ECounterKey , class ETimerKey = EDummy>
void cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::StopTimer ( ETimerKey key)
inline

Stops timer.

Parameters
keyTimer key

Definition at line 135 of file CaMonitor.h.

References cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::fMonitorData.

◆ ToString()

template<class ECounterKey , class ETimerKey >
std::string cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::ToString ( ) const

Friends And Related Symbol Documentation

◆ boost::serialization::access

template<class ECounterKey , class ETimerKey = EDummy>
friend class boost::serialization::access
friend

Definition at line 140 of file CaMonitor.h.

Member Data Documentation

◆ faCounterNames

template<class ECounterKey , class ETimerKey = EDummy>
CounterArray<std::string> cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::faCounterNames {}
private

◆ faTimerNames

template<class ECounterKey , class ETimerKey = EDummy>
TimerArray<std::string> cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::faTimerNames {}
private

◆ fMonitorData

◆ fsName

template<class ECounterKey , class ETimerKey = EDummy>
std::string cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::fsName
private

◆ fvCounterRatioKeys

template<class ECounterKey , class ETimerKey = EDummy>
std::vector<ECounterKey> cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::fvCounterRatioKeys {}
private

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

Definition at line 155 of file CaMonitor.h.

Referenced by cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::serialize(), and cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::SetRatioKeys().


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