The Gaudi Framework  v36r1 (3e2fb5a8)
Gaudi::Monitoring::Hub Struct Reference

Central entity in a Gaudi application that manages monitoring objects (i.e. More...

#include </builds/gaudi/Gaudi/GaudiKernel/include/Gaudi/MonitoringHub.h>

Collaboration diagram for Gaudi::Monitoring::Hub:

Classes

class  Entity
 Wrapper class for arbitrary monitoring objects. More...
 
struct  Sink
 Interface reporting services must implement. More...
 

Public Types

using json = nlohmann::json
 

Public Member Functions

template<typename T >
void registerEntity (std::string c, std::string n, std::string t, T &ent)
 
void registerEntity (Entity ent)
 
template<typename T >
void removeEntity (T &ent)
 
void addSink (Sink *sink)
 
void removeSink (Sink *sink)
 

Private Attributes

std::deque< Sink * > m_sinks
 
std::deque< Entitym_entities
 

Detailed Description

Central entity in a Gaudi application that manages monitoring objects (i.e.

counters, histograms, etc.).

The Gaudi::Monitoring::Hub delegates the actual reports to services implementing the Gaudi::Monitoring::Hub::Sink interface.

Definition at line 24 of file MonitoringHub.h.

Member Typedef Documentation

◆ json

using Gaudi::Monitoring::Hub::json = nlohmann::json

Definition at line 25 of file MonitoringHub.h.

Member Function Documentation

◆ addSink()

void Gaudi::Monitoring::Hub::addSink ( Sink sink)
inline

Definition at line 102 of file MonitoringHub.h.

102  {
104  [sink]( Entity ent ) { sink->registerEntity( std::move( ent ) ); } );
105  m_sinks.push_back( sink );
106  }

◆ registerEntity() [1/2]

void Gaudi::Monitoring::Hub::registerEntity ( Entity  ent)
inline

Definition at line 88 of file MonitoringHub.h.

88  {
90  [ent]( auto sink ) { sink->registerEntity( std::move( ent ) ); } );
91  m_entities.emplace_back( std::move( ent ) );
92  }

◆ registerEntity() [2/2]

template<typename T >
void Gaudi::Monitoring::Hub::registerEntity ( std::string  c,
std::string  n,
std::string  t,
T &  ent 
)
inline

Definition at line 85 of file MonitoringHub.h.

85  {
86  registerEntity( {std::move( c ), std::move( n ), std::move( t ), ent} );
87  }

◆ removeEntity()

template<typename T >
void Gaudi::Monitoring::Hub::removeEntity ( T &  ent)
inline

Definition at line 94 of file MonitoringHub.h.

94  {
95  auto it = std::find( begin( m_entities ), end( m_entities ), &ent );
96  if ( it != m_entities.end() ) {
97  std::for_each( begin( m_sinks ), end( m_sinks ), [&it]( auto sink ) { sink->removeEntity( *it ); } );
98  m_entities.erase( it );
99  }
100  }

◆ removeSink()

void Gaudi::Monitoring::Hub::removeSink ( Sink sink)
inline

Definition at line 107 of file MonitoringHub.h.

107  {
108  auto it = std::find( begin( m_sinks ), end( m_sinks ), sink );
109  if ( it != m_sinks.end() ) m_sinks.erase( it );
110  }

Member Data Documentation

◆ m_entities

std::deque<Entity> Gaudi::Monitoring::Hub::m_entities
private

Definition at line 114 of file MonitoringHub.h.

◆ m_sinks

std::deque<Sink*> Gaudi::Monitoring::Hub::m_sinks
private

Definition at line 113 of file MonitoringHub.h.


The documentation for this struct was generated from the following file:
std::for_each
T for_each(T... args)
Gaudi::Monitoring::Hub::m_sinks
std::deque< Sink * > m_sinks
Definition: MonitoringHub.h:113
std::move
T move(T... args)
std::find
T find(T... args)
Gaudi::Monitoring::Hub::m_entities
std::deque< Entity > m_entities
Definition: MonitoringHub.h:114
gaudirun.c
c
Definition: gaudirun.py:509
bug_34121.t
t
Definition: bug_34121.py:30
CLHEP::begin
double * begin(CLHEP::HepVector &v)
Definition: TupleAlg.cpp:45
Gaudi::Monitoring::Hub::registerEntity
void registerEntity(std::string c, std::string n, std::string t, T &ent)
Definition: MonitoringHub.h:85
GaudiPluginService.cpluginsvc.n
n
Definition: cpluginsvc.py:221
IOTest.end
end
Definition: IOTest.py:123