![]() |
The Gaudi Framework
v29r0 (ff2e7097)
|
Small wrapper class for easy manipulation with generic counters and IStatSvc&ICounterSvc interface. More...
#include <GaudiKernel/Stat.h>
Public Member Functions | |
Stat (StatEntity *entity=0, const std::string &name="", const std::string &group="") | |
constructor from StatEntity, name and group : More... | |
Stat (StatEntity &entity, const std::string &name="", const std::string &group="") | |
constructor from StatEntity, name and group : More... | |
Stat (IStatSvc *svc, const std::string &tag) | |
constructor from IStatSvc, tag and value More... | |
Stat (IStatSvc *svc, const std::string &tag, const double flag) | |
constructor from IStatSvc, tag and value More... | |
Stat (ICounterSvc *svc, const std::string &group, const std::string &name) | |
constructor from ICounterSvc, group and name More... | |
Stat (const Stat &)=default | |
copy constructor More... | |
Stat & | operator= (const Stat &)=default |
Assignement operator. More... | |
~Stat ()=default | |
destructor More... | |
const StatEntity * | entity () const |
get the entity More... | |
const StatEntity * | operator-> () const |
dereference operaqtor More... | |
operator const StatEntity & () const | |
cast to StatEntity More... | |
bool | operator! () const |
check validity More... | |
Stat & | operator+= (const double f) |
General increment for the counter. More... | |
Stat & | operator++ () |
Pre-increment operator for the counter. More... | |
Stat & | operator++ (int) |
Post-increment operator for the counter. More... | |
Stat & | operator-= (const double f) |
General decrement operator for the counter. More... | |
Stat & | operator-- () |
Pre-decrement operator for the flag. More... | |
Stat & | operator-- (int) |
Post-decrement operator for the flag. More... | |
Stat & | operator+= (const StatEntity &right) |
increment with StatEntity object More... | |
Stat & | operator+= (const Stat &right) |
increment with other stat objects More... | |
std::string | toString () const |
representation as string More... | |
std::ostream & | print (std::ostream &o=std::cout) const |
printout to std::ostream More... | |
std::ostream & | fillStream (std::ostream &o) const |
printout to std::ostream More... | |
StatEntity * | counter () const |
alternative access to underlying counter (for ICounterSvc::CounterObj) More... | |
const std::string & | name () const |
counter name More... | |
const std::string & | group () const |
counter group (for ICounterSvc) More... | |
Private Attributes | |
StatEntity * | m_entity = nullptr |
underlying counter More... | |
std::string | m_tag |
unique stat tag(name) More... | |
std::string | m_group |
SmartIF< IStatSvc > | m_stat |
Stat service. More... | |
SmartIF< ICounterSvc > | m_counter |
Counter Service. More... | |
Small wrapper class for easy manipulation with generic counters and IStatSvc&ICounterSvc interface.
It acts as "smart pointer" fro StatEntity objects, and allows manipulation with StatEntity objects, owned by GaudiCommon<TYPE> base class and/or IStatSvc/ICounterSvc
Alternatively one can use operator methods:
|
inline |
constructor from StatEntity, name and group :
entity | pointer to entity object |
name | (optional) name of the object, for printout |
group | (optional) group of the object, for printout |
Definition at line 65 of file Stat.h.
|
inline |
constructor from StatEntity, name and group :
entity | reference to entity object |
name | (optional) name of the object, for printout |
group | (optional) group of the object, for printout |
Definition at line 83 of file Stat.h.
Stat::Stat | ( | IStatSvc * | svc, |
const std::string & | tag | ||
) |
constructor from IStatSvc, tag and value
Definition at line 43 of file Stat.cpp.
Stat::Stat | ( | IStatSvc * | svc, |
const std::string & | tag, | ||
const double | flag | ||
) |
constructor from IStatSvc, tag and value
svc | pointer to Chrono&Stat Service tag unique tag for the entry |
flag | "flag"(additive quantity) to be used |
Definition at line 76 of file Stat.cpp.
Stat::Stat | ( | ICounterSvc * | svc, |
const std::string & | group, | ||
const std::string & | name | ||
) |
constructor from ICounterSvc, group and name
svc | pointer to Counter Service |
group | group name |
name | counter name |
Definition at line 93 of file Stat.cpp.
|
default |
copy constructor
|
default |
destructor
|
inline |
|
inline |
|
inline |
printout to std::ostream
s | the reference to the output stream |
Definition at line 276 of file Stat.h.
|
inline |
|
inline |
|
inline |
|
inline |
Pre-increment operator for the counter.
Definition at line 194 of file Stat.h.
|
inline |
Post-increment operator for the counter.
Definition at line 213 of file Stat.h.
|
inline |
General increment for the counter.
f | value to be added to the counter |
Definition at line 174 of file Stat.h.
|
inline |
|
inline |
|
inline |
|
inline |
General decrement operator for the counter.
f | counter decrement |
Definition at line 225 of file Stat.h.
|
inline |
std::ostream & Stat::print | ( | std::ostream & | o = std::cout | ) | const |
printout to std::ostream
s | the reference to the output stream |
Definition at line 120 of file Stat.cpp.
std::string Stat::toString | ( | ) | const |
representation as string
Definition at line 109 of file Stat.cpp.
|
private |
|
private |
|
private |
|
private |