The Gaudi Framework  master (3de0aae8)
Loading...
Searching...
No Matches
Gaudi::Accumulators::PrintableCounter Struct Referenceabstract

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

#include </builds/gaudi/Gaudi/GaudiKernel/include/Gaudi/Accumulators.h>

Inheritance diagram for Gaudi::Accumulators::PrintableCounter:

Public Member Functions

 PrintableCounter ()=default
virtual ~PrintableCounter ()=default
 destructor
template<typename stream>
stream & printImpl (stream &s, std::string_view tag) const
virtual std::ostream & print (std::ostream &, bool tableFormat=false) const =0
 prints the counter to a stream
virtual MsgStream & print (MsgStream &, bool tableFormat=true) const =0
virtual std::ostream & print (std::ostream &o, std::string_view tag) const
 prints the counter to a stream in table format, with the given tag
virtual MsgStream & print (MsgStream &o, std::string_view tag) const
virtual bool toBePrinted () const
 hint whether we should print that counter or not.
std::string toString () const
 get a string representation

Detailed Description

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

See also
Gaudi::Accumulators for detailed documentation

Definition at line 891 of file Accumulators.h.

Constructor & Destructor Documentation

◆ PrintableCounter()

Gaudi::Accumulators::PrintableCounter::PrintableCounter ( )
default

◆ ~PrintableCounter()

virtual Gaudi::Accumulators::PrintableCounter::~PrintableCounter ( )
virtualdefault

destructor

Member Function Documentation

◆ print() [1/4]

◆ print() [2/4]

virtual MsgStream & Gaudi::Accumulators::PrintableCounter::print ( MsgStream & o,
std::string_view tag ) const
inlinevirtual

◆ print() [3/4]

◆ print() [4/4]

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

◆ printImpl()

template<typename stream>
stream & Gaudi::Accumulators::PrintableCounter::printImpl ( stream & s,
std::string_view tag ) const
inline

Definition at line 897 of file Accumulators.h.

897 {
898 s << boost::format{ " | %|-48.48s|%|50t|" } % ( std::string{ '\"' }.append( tag ).append( "\"" ) );
899 return print( s, true );
900 }
virtual std::ostream & print(std::ostream &, bool tableFormat=false) const =0
prints the counter to a stream

◆ toBePrinted()

◆ toString()

std::string Gaudi::Accumulators::PrintableCounter::toString ( ) const
inline

get a string representation

Definition at line 911 of file Accumulators.h.

911 {
912 std::ostringstream ost;
913 print( ost );
914 return ost.str();
915 }

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