17 #include "boost/format.hpp" 91 m_stat -> stat( tag , flag ) ;
148 return o <<
boost::format(
" %|1$15s|::%|2$-15s| %|32t|%NULL%")
158 % (
"\"" +
m_tag +
"\"" ) ;
164 {
Stat s( stat ) ; s += value ;
return s ; }
169 {
Stat s( stat ) ; s -= value ;
return s ; }
174 {
Stat s( stat ) ; s += value ;
return s ; }
178 {
Stat s( stat ) ; s += value ;
return s ; }
182 {
return stat.
print( stream ) ; }
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Small wrapper class for easy manipulation with generic counters and IStatSvc&ICounterSvc interface...
Create / access multi purpose counters.
SmartIF< IStatSvc > m_stat
Stat service.
virtual void stat(const StatTag &t, const StatFlag &f)=0
add statistical information to the entity , tagged by its name
StatEntity * m_entity
underlying counter
Stat operator+(const Stat &stat, const double value)
external operator for addition of Stat and a number
void reset()
reset the counters
const std::string & name() const
counter name
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 :
std::string toString() const
representation as string
std::ostream & operator<<(std::ostream &stream, const Stat &stat)
output operator for the counter object
"Stat"-related part of interface IChronoStatSvc
The basic counter used for Monitoring purposes.
std::ostream & print(std::ostream &o=std::cout) const
printout to std::ostream
const std::string & group() const
counter group (for ICounterSvc)
Stat operator-(const Stat &stat, const double value)
external operator for subtraction of Stat and a number