Go to the documentation of this file.
11 #ifndef __GAUDI_CHRONOSTATSVC_STAT_H__
12 #define __GAUDI_CHRONOSTATSVC_STAT_H__
75 : m_entity( entity ), m_tag(
name ), m_group( group ) {}
91 : m_entity( &entity ), m_tag(
name ), m_group( group ) {}
162 if ( m_entity ) { ( *m_entity ) += f; }
179 if ( m_entity ) { ++( *m_entity ); }
195 if ( m_entity ) { ( *m_entity )++; }
204 if ( m_entity ) { ( *m_entity ) -= f; }
209 if ( m_entity ) { --( *m_entity ); }
214 if ( m_entity ) { ( *m_entity )--; }
219 if ( m_entity ) { ( *m_entity ) += right; }
224 if ( 0 != right.entity() ) { ( *this ) += *right.entity(); }
278 #endif // __GAUDI_CHRONOSTATSVC_STAT_H__
Stat(const Stat &)=default
copy constructor
std::ostream & fillStream(std::ostream &o) const
printout to std::ostream
Stat & operator++(int)
Post-increment operator for the counter.
backward compatible StatEntity class.
Stat & operator+=(const double f)
General increment for the counter.
const StatEntity * entity() const
get the entity
GAUDI_API std::ostream & operator<<(std::ostream &stream, const Stat &stat)
external printout operator to std::ostream
SmartIF< IStatSvc > m_stat
Stat service.
const std::string & name() const
counter name
std::string m_tag
unique stat tag(name)
Stat & operator++()
Pre-increment operator for the counter.
Stat & operator--()
Pre-decrement operator for the flag.
Stat(StatEntity &entity, const std::string &name="", const std::string &group="")
constructor from StatEntity, name and group :
Stat & operator--(int)
Post-decrement operator for the flag.
Stat & operator+=(const StatEntity &right)
increment with StatEntity object
Stat(StatEntity *entity=0, const std::string &name="", const std::string &group="")
constructor from StatEntity, name and group :
const StatEntity * operator->() const
dereference operaqtor
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
~Stat()=default
destructor
const std::string & group() const
counter group
Stat & operator=(const Stat &)=default
Assignement operator.
GAUDI_API Stat operator+(const Stat &stat, const double value)
external operator for addition of Stat and a number
StatEntity * counter() const
alternative access to underlying counter
bool operator!() const
check validity
Stat & operator-=(const double f)
General decrement operator for the counter.
Stat & operator+=(const Stat &right)
increment with other stat objects
GAUDI_API Stat operator-(const Stat &stat, const double value)
external operator for subtraction of Stat and a number