ATLAS Offline Software
|
Group of local monitoring quantities and retain correlation when filling histograms More...
#include <MonitoredGroup.h>
Public Member Functions | |
template<typename... T> | |
Group (const ToolHandle< GenericMonitoringTool > &tool, T &&... monitoredGroup) | |
Group of monitored variables. More... | |
Group (const ToolHandle< GenericMonitoringTool > &tool, const std::vector< std::reference_wrapper< IMonitoredVariable >> &monitoredGroup) | |
Group (const ToolHandle< GenericMonitoringTool > &tool, std::vector< std::reference_wrapper< IMonitoredVariable >> &&monitoredGroup) | |
~Group () | |
void | fill () |
Explicitly fill the monitoring histograms and disable autoFill. More... | |
void | setAutoFill (bool isEnabled) |
enables/disables filling when Monitored::Group leaves the scope More... | |
Protected Attributes | |
ToolHandle< GenericMonitoringTool > | m_tool |
bool | m_autoFill |
const std::vector< std::reference_wrapper< IMonitoredVariable > > | m_monitoredGroup |
Group of local monitoring quantities and retain correlation when filling histograms
In order to maintain correlations when filling histograms (e.g. eta and phi of a track) the monitored quantities need to be grouped within a Monitored::Group. The filling of the histogram occurs when the Monitored::Group object goes out of scope or when fill() is called explicitly.
The actual histogram definitions, i.e. which variable gets filled into which histogram, is configured entirely in Python. See GenericMonitoringTool.defineHistogram for the available options.
Monitored quantities can be used to fill 2D histograms. No code change is needed for it however the monitored variables need to be grouped correctly
The same variables can be re-used to perform multiple fill operations:
The automatic filling at the end of the scope can be disabled:
Instead explicit filling can be used:
Histograms can be filled conditionally with one variable serving as a (boolean) cut mask:
The same can be done with a Monitored::Collection:
A weight variable can be used for scalars:
and collections:
Definition at line 54 of file MonitoredGroup.h.
|
inline |
Group of monitored variables.
The filling of the associated histograms occurs when the object goes out of scope or when fill() is called explicitly.
tool | a handle to a monitoring tool, if invalid nothing is done |
monitoredGroup | list of variables to be monitored |
Definition at line 66 of file MonitoredGroup.h.
|
inline |
Definition at line 72 of file MonitoredGroup.h.
|
inline |
Definition at line 78 of file MonitoredGroup.h.
|
inline |
Definition at line 84 of file MonitoredGroup.h.
|
inline |
Explicitly fill the monitoring histograms and disable autoFill.
This will fill the monitoring histograms and also call setAutoFill(false) in order to disable the automatic filling when the Monitored::Group goes out of scope. A typical use-pattern is in tight loops in order not to re-create the Monitored::Group object many times:
Definition at line 100 of file MonitoredGroup.h.
|
inline |
enables/disables filling when Monitored::Group leaves the scope
By default Monitored::Group will perform a one time fill each time it goes out of scope. This feature can be disabled by calling setAutoFill(false). The same is achieved by calling fill() manually.
Definition at line 113 of file MonitoredGroup.h.
|
protected |
Definition at line 117 of file MonitoredGroup.h.
|
protected |
Definition at line 118 of file MonitoredGroup.h.
|
protected |
Definition at line 116 of file MonitoredGroup.h.