120 Stat(
IStatSvc* svc,
const std::string& tag,
const double flag );
152 if (
m_entity ) { ( *m_entity ) += f; }
169 if (
m_entity ) { ++( *m_entity ); }
185 if (
m_entity ) { ( *m_entity )++; }
194 if (
m_entity ) { ( *m_entity ) -= f; }
199 if (
m_entity ) { --( *m_entity ); }
204 if (
m_entity ) { ( *m_entity )--; }
209 if (
m_entity ) { ( *m_entity ) += right; }
214 if ( 0 != right.
entity() ) { ( *this ) += *right.
entity(); }
218 std::string toString()
const;
223 std::ostream& print( std::ostream& o = std::cout )
const;
GAUDI_API std::ostream & operator<<(std::ostream &stream, const Stat &stat)
external printout operator to std::ostream
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
Small smart pointer class with automatic reference counting for IInterface.
backward compatible StatEntity class.
Small wrapper class for easy manipulation with generic counters and IStatSvc interface.
const StatEntity * operator->() const
dereference operaqtor
Stat(StatEntity &entity, const std::string &name="", const std::string &group="")
constructor from StatEntity, name and group :
Stat & operator+=(const double f)
General increment for the counter.
std::ostream & fillStream(std::ostream &o) const
printout to std::ostream
Stat & operator++()
Pre-increment operator for the counter.
~Stat()=default
destructor
std::string m_tag
unique stat tag(name)
Stat & operator+=(const Stat &right)
increment with other stat objects
Stat(const Stat &)=default
copy constructor
Stat(StatEntity *entity=0, const std::string &name="", const std::string &group="")
constructor from StatEntity, name and group :
Stat & operator-=(const double f)
General decrement operator for the counter.
const StatEntity * entity() const
get the entity
Stat & operator--()
Pre-decrement operator for the flag.
Stat & operator++(int)
Post-increment operator for the counter.
StatEntity * m_entity
underlying counter
Stat & operator+=(const StatEntity &right)
increment with StatEntity object
Stat & operator--(int)
Post-decrement operator for the flag.
Stat & operator=(const Stat &)=default
Assignement operator.
std::ostream & print(std::ostream &o=std::cout) const
printout to std::ostream
SmartIF< IStatSvc > m_stat
Stat service.
StatEntity * counter() const
alternative access to underlying counter
bool operator!() const
check validity
const std::string & name() const
counter name
const std::string & group() const
counter group