10 #include "GaudiKernel/IStatSvc.h"
11 #include "GaudiKernel/ICounterSvc.h"
12 #include "GaudiKernel/Stat.h"
13 #include "GaudiKernel/StatEntity.h"
17 #include "boost/format.hpp"
44 const std::string& tag )
83 const std::string& tag ,
91 m_stat -> stat( tag , flag ) ;
106 const std::string& group ,
107 const std::string&
name )
126 std::ostringstream ost ;
148 return o <<
boost::format(
" %|1$15s|::%|2$-15s| %|32t|%NULL%")
158 % (
"\"" +
m_tag +
"\"" ) ;
182 {
return stat.
print( stream ) ; }
SmartIF< ICounterSvc > m_counter
Counter Service.
Small wrapper class for easy manipulation with generic counters and IStatSvc&ICounterSvc interface...
Create / access multi purpose counters.
virtual void stat(const StatTag &t, const StatFlag &f)=0
add statistical information to the entity , tagged by its name
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)
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Stat(StatEntity *entity=0, const std::string &name="", const std::string &group="")
constructor from StatEntity, name and group :
SmartIF< IStatSvc > m_stat
Stat service.
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
StatEntity * m_entity
underlying counter
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