|
CbmRoot
|
Monitor class for the CA tracking. More...
#include <CaMonitor.h>
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. | |
| Monitor & | operator= (const Monitor &)=delete |
| Copy assignment operator. | |
| Monitor & | operator= (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 Timer & | GetTimer (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 |
Monitor class for the CA tracking.
| ECounterKey | A enum class, containing keys for monitorables |
| ETimerKey | A enum class, containing keys for timers |
Definition at line 35 of file CaMonitor.h.
| 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.
| 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.
|
inline |
Constructor.
| name | Name of monitor |
Definition at line 47 of file CaMonitor.h.
References fsName.
Referenced by Monitor(), Monitor(), operator=(), and operator=().
|
default |
Default constructor.
|
default |
Destructor.
|
delete |
Copy constructor.
References Monitor().
|
delete |
Move constructor.
References Monitor().
|
inline |
Adds the other monitor data to this.
| data | Reference to the other MonitorData object to add |
| parallel | True, if the monitor data were obtained in parallel (See Timer::AddMonitorData) |
Definition at line 70 of file CaMonitor.h.
References fMonitorData.
Referenced by cbm::algo::TrackingChain::PrepareOutput().
|
inline |
Gets counter name.
| key | Counter key |
Definition at line 77 of file CaMonitor.h.
References faCounterNames.
|
inline |
Gets counter value.
| key |
Definition at line 81 of file CaMonitor.h.
References fMonitorData.
|
inline |
|
inline |
|
inline |
Gets timer.
| key | Timer key |
Definition at line 91 of file CaMonitor.h.
References fMonitorData.
|
inline |
Gets timer name.
| key | Timer key |
Definition at line 95 of file CaMonitor.h.
References faTimerNames.
|
inline |
Increments key counter by 1.
| key | Counter key |
Definition at line 99 of file CaMonitor.h.
References fMonitorData.
|
inline |
Increments key counter by a number.
| key | Counter key |
| num | Number to add |
Definition at line 104 of file CaMonitor.h.
References fMonitorData.
|
delete |
Copy assignment operator.
References Monitor().
|
delete |
Move assignment operator.
References Monitor().
|
inline |
|
inline |
Definition at line 142 of file CaMonitor.h.
References faCounterNames, faTimerNames, fMonitorData, fsName, and fvCounterRatioKeys.
|
inline |
Sets name of counter.
| name | Name of counter |
Definition at line 115 of file CaMonitor.h.
References faCounterNames.
|
inline |
Sets monitor data.
| data | The MonitorData class objet |
Definition at line 119 of file CaMonitor.h.
References fMonitorData.
|
inline |
Sets name of the monitor.
| name | Name of the monitor |
Definition at line 123 of file CaMonitor.h.
References fsName.
|
inline |
Sets keys of counters, which are used as denominators for ratios.
| vKeys | Vector of keys |
Definition at line 111 of file CaMonitor.h.
References fvCounterRatioKeys.
|
inline |
Sets name of the timer.
| name | Name of the timer |
Definition at line 127 of file CaMonitor.h.
References faTimerNames.
|
inline |
Starts timer.
| key | Timer key |
Definition at line 131 of file CaMonitor.h.
References fMonitorData.
|
inline |
Stops timer.
| key | Timer key |
Definition at line 135 of file CaMonitor.h.
References fMonitorData.
| std::string Monitor::ToString | ( | ) | const |
Prints counters summary to string.
Definition at line 167 of file CaMonitor.h.
References faCounterNames, faTimerNames, fMonitorData, fsName, fvCounterRatioKeys, cbm::algo::ca::Timer::GetAverage(), cbm::algo::ca::Timer::GetMax(), cbm::algo::ca::Timer::GetMin(), cbm::algo::ca::Timer::GetNofCalls(), and cbm::algo::ca::Timer::GetTotal().
|
friend |
Definition at line 140 of file CaMonitor.h.
References boost::serialization::access.
Referenced by boost::serialization::access.
|
private |
Array of counter names.
Definition at line 154 of file CaMonitor.h.
Referenced by GetCounterName(), serialize(), SetCounterName(), and ToString().
|
private |
Array of timer names.
Definition at line 153 of file CaMonitor.h.
Referenced by GetTimerName(), serialize(), SetTimerName(), and ToString().
|
private |
Monitor data.
Definition at line 152 of file CaMonitor.h.
Referenced by AddMonitorData(), GetCounterValue(), GetMonitorData(), GetTimer(), IncrementCounter(), IncrementCounter(), Reset(), serialize(), SetMonitorData(), StartTimer(), StopTimer(), and ToString().
|
private |
Name of the monitor.
Definition at line 156 of file CaMonitor.h.
Referenced by GetName(), Monitor(), serialize(), SetName(), and ToString().
|
private |
List of keys, which are used as denominators in ratios.
Definition at line 155 of file CaMonitor.h.
Referenced by serialize(), SetRatioKeys(), and ToString().