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

#include <TIDAHistogram.h>

Inheritance diagram for TIDA::Histogram2D< T, U >:
Collaboration diagram for TIDA::Histogram2D< T, U >:

Public Member Functions

void Fill (T x, U y) const
void Fill (T x, U y, T w) const
const Histogram2Doperator-> () 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, typename U = T>
class TIDA::Histogram2D< T, U >

Definition at line 81 of file TIDAHistogram.h.

Member Function Documentation

◆ Fill() [1/2]

template<typename T, typename U = T>
void TIDA::Histogram2D< T, U >::Fill ( T x,
U y ) const
inline

Definition at line 87 of file TIDAHistogram.h.

87 {
88 if ( !initialised() ) throw std::runtime_error("TIDA::Histogram not initialised: "+name());
89 auto sx = Monitored::Scalar<T>( varname()+"__x", x );
90 auto sy = Monitored::Scalar<T>( varname()+"__y", y );
92 }
const std::string & varname() const
const std::string & name() const
const ToolHandle< GenericMonitoringTool > * monTool() const
bool initialised() const

◆ Fill() [2/2]

template<typename T, typename U = T>
void TIDA::Histogram2D< T, U >::Fill ( T x,
U y,
T w ) const
inline

Definition at line 94 of file TIDAHistogram.h.

94 {
95 if ( !initialised() ) throw std::runtime_error("TIDA::Histogram not initialised: "+name());
96 auto sx = Monitored::Scalar<T>( varname()+"__x", x );
97 auto sy = Monitored::Scalar<T>( varname()+"__y", y );
98 auto sw = Monitored::Scalar<T>( varname()+"_weight", w );
100 }

◆ HistogramBase() [1/2]

template<typename T, typename U = 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, typename U = 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, typename U = T>
const Histogram2D * TIDA::Histogram2D< T, U >::operator-> ( ) const
inline

Definition at line 102 of file TIDAHistogram.h.

102{ 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: