The Gaudi Framework  v30r3 (a5ef0a68)
Gaudi::Accumulators::PrintableCounter Struct Referenceabstract

An empty ancester of all counters that knows how to print themselves. More...

#include <GaudiKernel/Counters.h>

Inheritance diagram for Gaudi::Accumulators::PrintableCounter:

Public Member Functions

 PrintableCounter ()=default
 
template<class OWNER >
 PrintableCounter (OWNER *o, const std::string &tag)
 
virtual ~PrintableCounter ()=default
 destructor More...
 
virtual std::ostreamprint (std::ostream &, bool tableFormat=false) const =0
 prints the counter to a stream More...
 
virtual std::ostreamprint (std::ostream &o, const std::string &tag) const
 prints the counter to a stream in table format, with the given tag More...
 
std::string toString () const
 get a string representation More...
 

Detailed Description

An empty ancester of all counters that knows how to print themselves.

Definition at line 610 of file Counters.h.

Constructor & Destructor Documentation

Gaudi::Accumulators::PrintableCounter::PrintableCounter ( )
default
template<class OWNER >
Gaudi::Accumulators::PrintableCounter::PrintableCounter ( OWNER *  o,
const std::string tag 
)
inline

Definition at line 613 of file Counters.h.

614  {
615  o->registerCounter( tag, *this );
616  }
virtual Gaudi::Accumulators::PrintableCounter::~PrintableCounter ( )
virtualdefault

destructor

Member Function Documentation

virtual std::ostream& Gaudi::Accumulators::PrintableCounter::print ( std::ostream o,
const std::string tag 
) const
inlinevirtual

prints the counter to a stream in table format, with the given tag

Reimplemented in StatEntity, and Gaudi::Accumulators::BinomialCounter< Arithmetic, Atomicity >.

Definition at line 622 of file Counters.h.

623  {
624  o << boost::format{" | %|-48.48s|%|50t|"} % ( "\"" + tag + "\"" );
625  return print( o, true );
626  }
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:120
virtual std::ostream & print(std::ostream &, bool tableFormat=false) const =0
prints the counter to a stream
std::string Gaudi::Accumulators::PrintableCounter::toString ( ) const
inline

get a string representation

Definition at line 628 of file Counters.h.

629  {
630  std::ostringstream ost;
631  print( ost );
632  return ost.str();
633  }
virtual std::ostream & print(std::ostream &, bool tableFormat=false) const =0
prints the counter to a stream

The documentation for this struct was generated from the following file: