CbmRoot
Loading...
Searching...
No Matches
cbm::algo::ca::MonitorData< C, T > Class Template Reference

Monitor data block. More...

#include <CaMonitorData.h>

Inheritance diagram for cbm::algo::ca::MonitorData< C, T >:
[legend]
Collaboration diagram for cbm::algo::ca::MonitorData< C, T >:
[legend]

Public Types

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

Public Member Functions

 MonitorData ()=default
 Default constructor.
 
 MonitorData (const MonitorData &)=default
 Copy constructor.
 
 MonitorData (MonitorData &&)=default
 Move constructor.
 
 ~MonitorData ()=default
 Destructor.
 
MonitorDataoperator= (const MonitorData &)=default
 Copy assignment operator.
 
MonitorDataoperator= (MonitorData &&)=default
 Move assignment operator.
 
void AddMonitorData (const MonitorData &other, bool parallel=false)
 Adds the other monitor data to this.
 
int GetCounterValue (ECounterKey key) const
 Gets counter value.
 
int GetNofCounters () const
 Gets number of counters.
 
int GetNofTimers () const
 Gets number of timers.
 
const TimerGetTimer (ETimerKey key) const
 Gets timer.
 
void IncrementCounter (ECounterKey key)
 Increments key counter by 1.
 
void IncrementCounter (ECounterKey key, int num)
 Increments key counter by a number.
 
void Reset ()
 Resets all the counters and timers.
 
void StartTimer (ETimerKey key)
 Starts timer.
 
void StopTimer (ETimerKey key)
 Stops timer.
 

Private Member Functions

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

Private Attributes

TimerArray< TimerfaTimers {}
 Array of timers.
 
CounterArray< int > faCounters {}
 Array of counters.
 

Friends

class boost::serialization::access
 

Detailed Description

template<class C, class T>
class cbm::algo::ca::MonitorData< C, T >

Monitor data block.

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

Definition at line 80 of file Reco.h.

Member Typedef Documentation

◆ CounterArray

template<class C , class T >
template<typename T >
using cbm::algo::ca::MonitorData< C, T >::CounterArray = EnumArray<ECounterKey, T>

Alias to array, indexed by the counter enumeration.

Definition at line 31 of file CaMonitorData.h.

◆ TimerArray

template<class C , class T >
template<typename T >
using cbm::algo::ca::MonitorData< C, T >::TimerArray = EnumArray<ETimerKey, T>

Alias to array, indexed by the timer enumeration.

Definition at line 35 of file CaMonitorData.h.

Constructor & Destructor Documentation

◆ MonitorData() [1/3]

template<class C , class T >
cbm::algo::ca::MonitorData< C, T >::MonitorData ( )
default

Default constructor.

◆ MonitorData() [2/3]

template<class C , class T >
cbm::algo::ca::MonitorData< C, T >::MonitorData ( const MonitorData< C, T > & )
default

Copy constructor.

◆ MonitorData() [3/3]

template<class C , class T >
cbm::algo::ca::MonitorData< C, T >::MonitorData ( MonitorData< C, T > && )
default

Move constructor.

◆ ~MonitorData()

template<class C , class T >
cbm::algo::ca::MonitorData< C, T >::~MonitorData ( )
default

Destructor.

Member Function Documentation

◆ AddMonitorData()

template<class C , class T >
void cbm::algo::ca::MonitorData< ECounterKey, ETimerKey >::AddMonitorData ( const MonitorData< C, T > & other,
bool parallel = false )
inline

Adds the other monitor data to this.

Parameters
otherReference to the other MonitorData object to add
parallelIf the monitors were filled in parallel (See CaTimer::AddTimer)

Definition at line 114 of file CaMonitorData.h.

Referenced by cbm::algo::ca::TrackFinder::FindTracks().

◆ GetCounterValue()

template<class C , class T >
int cbm::algo::ca::MonitorData< C, T >::GetCounterValue ( ECounterKey key) const
inline

Gets counter value.

Parameters
key

Definition at line 62 of file CaMonitorData.h.

References cbm::algo::ca::MonitorData< C, T >::faCounters.

Referenced by cbm::algo::TrackingChain::PrepareOutput(), and cbm::algo::Reco::QueueTrackingMetrics().

◆ GetNofCounters()

template<class C , class T >
int cbm::algo::ca::MonitorData< C, T >::GetNofCounters ( ) const
inline

Gets number of counters.

Definition at line 65 of file CaMonitorData.h.

◆ GetNofTimers()

template<class C , class T >
int cbm::algo::ca::MonitorData< C, T >::GetNofTimers ( ) const
inline

Gets number of timers.

Definition at line 68 of file CaMonitorData.h.

◆ GetTimer()

template<class C , class T >
const Timer & cbm::algo::ca::MonitorData< C, T >::GetTimer ( ETimerKey key) const
inline

◆ IncrementCounter() [1/2]

template<class C , class T >
void cbm::algo::ca::MonitorData< C, T >::IncrementCounter ( ECounterKey key)
inline

◆ IncrementCounter() [2/2]

template<class C , class T >
void cbm::algo::ca::MonitorData< C, T >::IncrementCounter ( ECounterKey key,
int num )
inline

Increments key counter by a number.

Parameters
keyCounter key
numNumber to add

Definition at line 80 of file CaMonitorData.h.

References cbm::algo::ca::MonitorData< C, T >::faCounters.

◆ operator=() [1/2]

template<class C , class T >
MonitorData & cbm::algo::ca::MonitorData< C, T >::operator= ( const MonitorData< C, T > & )
default

Copy assignment operator.

◆ operator=() [2/2]

template<class C , class T >
MonitorData & cbm::algo::ca::MonitorData< C, T >::operator= ( MonitorData< C, T > && )
default

Move assignment operator.

◆ Reset()

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

Resets all the counters and timers.

Definition at line 128 of file CaMonitorData.h.

Referenced by cbm::algo::TrackingChain::Run().

◆ serialize()

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

◆ StartTimer()

template<class C , class T >
void cbm::algo::ca::MonitorData< C, T >::StartTimer ( ETimerKey key)
inline

◆ StopTimer()

template<class C , class T >
void cbm::algo::ca::MonitorData< C, T >::StopTimer ( ETimerKey key)
inline

Friends And Related Symbol Documentation

◆ boost::serialization::access

template<class C , class T >
friend class boost::serialization::access
friend

Definition at line 94 of file CaMonitorData.h.

Member Data Documentation

◆ faCounters

◆ faTimers


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