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 |
|
default |
Default constructor.
|
default |
Destructor.
|
delete |
Copy constructor.
|
delete |
Move constructor.
|
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 cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::fMonitorData.
Referenced by cbm::algo::TrackingChain::PrepareOutput(), and CbmL1::Reconstruct().
|
inline |
Gets counter name.
key | Counter key |
Definition at line 77 of file CaMonitor.h.
References cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::faCounterNames.
|
inline |
Gets counter value.
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().
|
inline |
Gets monitor data.
Definition at line 84 of file CaMonitor.h.
References cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::fMonitorData.
|
inline |
Gets name of the monitor.
Definition at line 87 of file CaMonitor.h.
References cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::fsName.
|
inline |
Gets timer.
key | Timer key |
Definition at line 91 of file CaMonitor.h.
References cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::fMonitorData.
|
inline |
Gets timer name.
key | Timer key |
Definition at line 95 of file CaMonitor.h.
References cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::faTimerNames.
|
inline |
Increments key counter by 1.
key | Counter key |
Definition at line 99 of file CaMonitor.h.
References cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::fMonitorData.
Referenced by cbm::ca::OutputQa::ExecQa(), cbm::ca::MCModule::InitEvent(), cbm::ca::MCModule::MatchHitWithMc(), and cbm::ca::MCModule::MatchTracks().
|
inline |
Increments key counter by a number.
key | Counter key |
num | Number to add |
Definition at line 104 of file CaMonitor.h.
References cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::fMonitorData.
|
delete |
Copy assignment operator.
|
delete |
Move assignment operator.
|
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().
|
inline |
Definition at line 142 of file CaMonitor.h.
References cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::faCounterNames, cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::faTimerNames, cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::fMonitorData, cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::fsName, and cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::fvCounterRatioKeys.
|
inline |
Sets name of counter.
name | Name 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().
|
inline |
Sets monitor data.
data | The MonitorData class objet |
Definition at line 119 of file CaMonitor.h.
References cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::fMonitorData.
|
inline |
Sets name of the monitor.
name | Name of the monitor |
Definition at line 123 of file CaMonitor.h.
References cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::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 cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::fvCounterRatioKeys.
Referenced by cbm::ca::OutputQa::InitQa(), and cbm::ca::MCModule::InitRun().
|
inline |
Sets name of the timer.
name | Name of the timer |
Definition at line 127 of file CaMonitor.h.
References cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::faTimerNames.
|
inline |
Starts timer.
key | Timer key |
Definition at line 131 of file CaMonitor.h.
References cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::fMonitorData.
|
inline |
Stops timer.
key | Timer key |
Definition at line 135 of file CaMonitor.h.
References cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::fMonitorData.
std::string cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::ToString | ( | ) | const |
Prints counters summary to string.
Definition at line 167 of file CaMonitor.h.
References 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().
Referenced by cbm::ca::OutputQa::Check(), cbm::algo::TrackingChain::Finalize(), cbm::ca::MCModule::Finish(), and CbmL1::Finish().
|
friend |
Definition at line 140 of file CaMonitor.h.
|
private |
Array of counter names.
Definition at line 154 of file CaMonitor.h.
Referenced by cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::GetCounterName(), cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::serialize(), and cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::SetCounterName().
|
private |
Array of timer names.
Definition at line 153 of file CaMonitor.h.
Referenced by cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::GetTimerName(), cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::serialize(), and cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::SetTimerName().
|
private |
Monitor data.
Definition at line 152 of file CaMonitor.h.
Referenced by cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::AddMonitorData(), cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::GetCounterValue(), cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::GetMonitorData(), cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::GetTimer(), cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::IncrementCounter(), cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::IncrementCounter(), cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::Reset(), cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::serialize(), cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::SetMonitorData(), cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::StartTimer(), and cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::StopTimer().
|
private |
Name of the monitor.
Definition at line 156 of file CaMonitor.h.
Referenced by cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::GetName(), cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::serialize(), and cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::SetName().
|
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().