ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
HLT::MET::MonGroupBuilder Class Reference

#include <MonGroupBuilder.h>

Collaboration diagram for HLT::MET::MonGroupBuilder:

Public Member Functions

void add (Monitored::IMonitoredVariable &variable)
 Add a new monitored variable. More...
 
template<typename T , typename = std::enable_if_t< !std::is_lvalue_reference_v<T> && std::is_base_of_v<Monitored::IMonitoredVariable, T>>>
void add (T &&variable)
 Add a new monitored variable. More...
 
Monitored::Group build (const ToolHandle< GenericMonitoringTool > &tool) const
 Build the monitored group. More...
 
void increaseCapacity (std::size_t value, bool owned=false)
 Increase the internal capacity. More...
 

Private Attributes

std::vector< std::reference_wrapper< Monitored::IMonitoredVariable > > m_references
 References to monitored variables. More...
 
std::vector< std::unique_ptr< Monitored::IMonitoredVariable > > m_ptrs
 Any monitored variables that we own directly. More...
 

Detailed Description

Definition at line 45 of file MonGroupBuilder.h.

Member Function Documentation

◆ add() [1/2]

void HLT::MET::MonGroupBuilder::add ( Monitored::IMonitoredVariable variable)

Add a new monitored variable.

Parameters
variableThe variable to monitor

This overload will not take ownership of the variable

Definition at line 28 of file MonGroupBuilder.cxx.

28  {
29  m_references.reserve(value+m_references.capacity() );
30  if (owned)
31  m_ptrs.reserve(value+m_ptrs.capacity() );

◆ add() [2/2]

template<typename T , typename = std::enable_if_t< !std::is_lvalue_reference_v<T> && std::is_base_of_v<Monitored::IMonitoredVariable, T>>>
void HLT::MET::MonGroupBuilder::add ( T &&  variable)
inline

Add a new monitored variable.

Template Parameters
TThe type of monitored variable
Parameters
variableThe variable to monitor

This overload will take ownership of the variable

Definition at line 82 of file MonGroupBuilder.h.

82  :
84  std::vector<std::reference_wrapper<Monitored::IMonitoredVariable>> m_references;
86  std::vector<std::unique_ptr<Monitored::IMonitoredVariable>> m_ptrs;

◆ build()

Monitored::Group HLT::MET::MonGroupBuilder::build ( const ToolHandle< GenericMonitoringTool > &  tool) const

Build the monitored group.

Parameters
toolThe monitoring tool to add the group to

Builds the monitored group. Note that if this builder owns any variables then fill must be called on the group before this object goes out of scope (remembering that groups call fill on destruction if it hasn't been called before this).

Definition at line 33 of file MonGroupBuilder.cxx.

◆ increaseCapacity()

void HLT::MET::MonGroupBuilder::increaseCapacity ( std::size_t  value,
bool  owned = false 
)

Increase the internal capacity.

Parameters
valueThe amount to increase capacity by
ownedWhether to increase the 'owned' capacity by the same amount

Increase the capacity of the internal vectors. This function is used for performance only.

Definition at line 39 of file MonGroupBuilder.cxx.

Member Data Documentation

◆ m_ptrs

std::vector<std::unique_ptr<Monitored::IMonitoredVariable> > HLT::MET::MonGroupBuilder::m_ptrs
private

Any monitored variables that we own directly.

Definition at line 114 of file MonGroupBuilder.h.

◆ m_references

std::vector<std::reference_wrapper<Monitored::IMonitoredVariable> > HLT::MET::MonGroupBuilder::m_references
private

References to monitored variables.

Definition at line 112 of file MonGroupBuilder.h.


The documentation for this class was generated from the following files:
athena.value
value
Definition: athena.py:124
HLT::MET::MonGroupBuilder::m_ptrs
std::vector< std::unique_ptr< Monitored::IMonitoredVariable > > m_ptrs
Any monitored variables that we own directly.
Definition: MonGroupBuilder.h:114
HLT::MET::MonGroupBuilder::m_references
std::vector< std::reference_wrapper< Monitored::IMonitoredVariable > > m_references
References to monitored variables.
Definition: MonGroupBuilder.h:112