ATLAS Offline Software
Loading...
Searching...
No Matches
TIDA::Histogram< T > Class Template Reference

#include <TIDAHistogram.h>

Inheritance diagram for TIDA::Histogram< T >:
Collaboration diagram for TIDA::Histogram< T >:

Public Member Functions

void Fill (T d) const
void Fill (T d, T w) const
const Histogramoperator-> () const
 HistogramBase ()
 HistogramBase (ToolHandle< GenericMonitoringTool > *m, const std::string &name, const std::string &domain="")
const std::string & name () const
const std::string & varname () const
bool initialised () const
const ToolHandle< GenericMonitoringTool > * monTool () const

Private Attributes

ToolHandle< GenericMonitoringTool > * m_monTool
std::string m_name
std::string m_varname
bool m_initialised

Detailed Description

template<typename T>
class TIDA::Histogram< T >

Definition at line 56 of file TIDAHistogram.h.

Member Function Documentation

◆ Fill() [1/2]

template<typename T>
void TIDA::Histogram< T >::Fill ( T d) const
inline

Definition at line 62 of file TIDAHistogram.h.

62 {
63 if ( !initialised() ) throw std::runtime_error("TIDA::Histogram not initialised: "+name());
64 auto s = Monitored::Scalar<T>( varname(), d );
66 }
const std::string & varname() const
const std::string & name() const
const ToolHandle< GenericMonitoringTool > * monTool() const
bool initialised() const

◆ Fill() [2/2]

template<typename T>
void TIDA::Histogram< T >::Fill ( T d,
T w ) const
inline

Definition at line 68 of file TIDAHistogram.h.

68 {
69 if ( !initialised() ) throw std::runtime_error("TIDA::Histogram not initialised: "+name());
70 auto s = Monitored::Scalar<T>( varname(), d );
71 auto sw = Monitored::Scalar<T>( varname()+"_weight", w );
73 }

◆ HistogramBase() [1/2]

template<typename T>
TIDA::HistogramBase::HistogramBase ( )
inline

Definition at line 29 of file TIDAHistogram.h.

29: m_monTool(0), m_name("UNINITIALISED"), m_varname(), m_initialised(false) { }
std::string m_varname
ToolHandle< GenericMonitoringTool > * m_monTool

◆ HistogramBase() [2/2]

template<typename T>
TIDA::HistogramBase::HistogramBase ( ToolHandle< GenericMonitoringTool > * m,
const std::string & name,
const std::string & domain = "" )
inline

Definition at line 31 of file TIDAHistogram.h.

31 :
32 m_monTool(m), m_name(name), m_varname(domain.empty() ? name : domain+"_"+name), m_initialised(false) {
33 if ( !m_name.empty() && m_monTool ) m_initialised = true;
34 }

◆ initialised()

bool TIDA::HistogramBase::initialised ( ) const
inlineinherited

Definition at line 39 of file TIDAHistogram.h.

39{ return m_initialised; }

◆ monTool()

const ToolHandle< GenericMonitoringTool > * TIDA::HistogramBase::monTool ( ) const
inlineinherited

Definition at line 41 of file TIDAHistogram.h.

41{ return m_monTool; };

◆ name()

const std::string & TIDA::HistogramBase::name ( ) const
inlineinherited

Definition at line 36 of file TIDAHistogram.h.

36{ return m_name; }

◆ operator->()

template<typename T>
const Histogram * TIDA::Histogram< T >::operator-> ( ) const
inline

Definition at line 75 of file TIDAHistogram.h.

75{ return this; }

◆ varname()

const std::string & TIDA::HistogramBase::varname ( ) const
inlineinherited

Definition at line 37 of file TIDAHistogram.h.

37{ return m_varname; }

Member Data Documentation

◆ m_initialised

bool TIDA::HistogramBase::m_initialised
privateinherited

Definition at line 50 of file TIDAHistogram.h.

◆ m_monTool

ToolHandle<GenericMonitoringTool>* TIDA::HistogramBase::m_monTool
privateinherited

Definition at line 45 of file TIDAHistogram.h.

◆ m_name

std::string TIDA::HistogramBase::m_name
privateinherited

Definition at line 47 of file TIDAHistogram.h.

◆ m_varname

std::string TIDA::HistogramBase::m_varname
privateinherited

Definition at line 48 of file TIDAHistogram.h.


The documentation for this class was generated from the following file: