1 #ifndef __GAUDI_CHRONOSTATSVC_STAT_H__ 2 #define __GAUDI_CHRONOSTATSVC_STAT_H__ 90 : m_entity ( &entity )
134 const double flag ) ;
187 Stat& operator+= (
const double f )
189 if ( m_entity ) { (*m_entity) += f ; }
207 if ( m_entity ) { ++(*m_entity) ; }
224 if ( m_entity ) { (*m_entity)++ ; }
232 Stat& operator-= (
const double f )
234 if ( m_entity ) { (*m_entity) -= f ; }
240 if ( m_entity ) { --(*m_entity) ; }
246 if ( m_entity ) { (*m_entity)-- ; }
252 if ( m_entity ) { (*m_entity) += right ; }
258 if ( 0 != right.
entity() ) { (*this) += *right.
entity() ; }
314 #endif // __GAUDI_CHRONOSTATSVC_STAT_H__
bool operator!() const
check validity
Small wrapper class for easy manipulation with generic counters and IStatSvc&ICounterSvc interface...
Create / access multi purpose counters.
SmartIF< IStatSvc > m_stat
Stat service.
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
StatEntity * counter() const
alternative access to underlying counter (for ICounterSvc::CounterObj)
const std::string & name() const
counter name
std::ostream & fillStream(std::ostream &o) const
printout to std::ostream
GAUDI_API std::ostream & operator<<(std::ostream &stream, const Stat &stat)
external printout operator to std::ostream
PropertyMgr & operator=(const PropertyMgr &)=delete
std::string m_tag
unique stat tag(name)
SmartIF< ICounterSvc > m_counter
Counter Service.
Stat(StatEntity *entity=0, const std::string &name="", const std::string &group="")
constructor from StatEntity, name and group :
Stat(StatEntity &entity, const std::string &name="", const std::string &group="")
constructor from StatEntity, name and group :
const StatEntity * operator->() const
dereference operaqtor
const StatEntity * entity() const
get the entity
Stat & operator+=(const StatEntity &right)
increment with StatEntity object
GAUDI_API Stat operator+(const Stat &stat, const double value)
external operator for addition of Stat and a number
GAUDI_API Stat operator-(const Stat &stat, const double value)
external operator for subtraction of Stat and a number
"Stat"-related part of interface IChronoStatSvc
The basic counter used for Monitoring purposes.
Stat & operator+=(const Stat &right)
increment with other stat objects
const std::string & group() const
counter group (for ICounterSvc)