| The Gaudi Framework v32r1 (f65d50dc)

Public Member Functions | List of all members
Gaudi::Accumulators::details::MsgCounter< level, Atomicity > Struct Template Reference

`#include <GaudiKernel/Counters.h>`

Inheritance diagram for Gaudi::Accumulators::details::MsgCounter< level, Atomicity >:
[legend]
Collaboration diagram for Gaudi::Accumulators::details::MsgCounter< level, Atomicity >:
[legend]

## Public Member Functions
template<typename OWNER >
| MsgCounter (OWNER *o, std::string const &msg, int nMax=10)
MsgCounter & | operator++ ()
template<typename stream >
stream & | printImpl (stream &o, bool tableFormat) const
std::ostream & | print (std::ostream &os, bool tableFormat) const override
| prints the counter to a stream More...
MsgStream & | print (MsgStream &os, bool tableFormat) const override
virtual std::ostream & | print (std::ostream &, bool tableFormat=false) const=0
| prints the counter to a stream More...
virtual MsgStream & | print (MsgStream &, bool tableFormat=true) const=0
virtual std::ostream & | print (std::ostream &o, const std::string &tag) const
| prints the counter to a stream in table format, with the given tag More...
virtual MsgStream & | print (MsgStream &o, const std::string &tag) const
Public Member Functions inherited from Gaudi::Accumulators::PrintableCounter
| PrintableCounter ()=default
template<class OWNER >
| PrintableCounter (OWNER *o, const std::string &tag)
virtual | ~PrintableCounter ()=default
| destructor More...
template<typename stream >
stream & | printImpl (stream &s, const std::string &tag) const
virtual std::ostream & | print (std::ostream &o, const std::string &tag) const
| prints the counter to a stream in table format, with the given tag More...
virtual MsgStream & | print (MsgStream &o, const std::string &tag) const
virtual bool | toBePrinted () const
| hint whether we should print that counter or not. More...
std::string | toString () const
| get a string representation More...
Public Member Functions inherited from Gaudi::Accumulators::details::MsgCounter::Logger
void | operator() (bool suppress=false) const
Public Member Functions inherited from Gaudi::Accumulators::GenericAccumulator< InputType, InnerType, Atomicity, InputTransform, OutputTransform, ValueHandler >
GenericAccumulator | operator+= (const InputType by)
| GenericAccumulator ()
template<typename... Args>
| GenericAccumulator (std::in_place_t, Args &&... args)
| GenericAccumulator (const GenericAccumulator &other)
GenericAccumulator & | operator= (const GenericAccumulator &other)
OutputType | value () const
void | reset ()
template<atomicity ato, typename VH >
void | mergeAndReset (GenericAccumulator< InputType, InnerType, ato, InputTransform, OutputTransform, VH > &&other)

## Additional Inherited Members
Public Types inherited from Gaudi::Accumulators::GenericAccumulator< InputType, InnerType, Atomicity, InputTransform, OutputTransform, ValueHandler >
using | OutputType = std::decay_t< std::result_of_t< OutputTransform(InnerType)> >
Public Attributes inherited from Gaudi::Accumulators::details::MsgCounter::Logger
CommonMessagingBase const * | parent
std::string | msg
MSG::Level | lvl
Protected Member Functions inherited from Gaudi::Accumulators::GenericAccumulator< InputType, InnerType, Atomicity, InputTransform, OutputTransform, ValueHandler >
void | reset (InnerType in)

## Detailed Description

### template<MSG::Level level, atomicity Atomicity = atomicity::full>
struct Gaudi::Accumulators::details::MsgCounter< level, Atomicity >

Definition at line 851 of file Counters.h.

## Constructor & Destructor Documentation

## ◆ MsgCounter()

template<MSG::Level level, atomicity Atomicity = atomicity::full>
template<typename OWNER >

Gaudi::Accumulators::details::MsgCounter< level, Atomicity >::MsgCounter | ( | OWNER * | o,
|  | std::string const & | msg,
|  | int | nMax = `10`
| ) |  |
| inline

Definition at line 857 of file Counters.h.

858 : PrintableCounter( o, msg )
859 , details::MsgCounter::Logger{o, msg, level}
860 , GenericAccumulator<bool, details::MsgCounter::Data<Atomicity>, Atomicity, Identity,
861 details::MsgCounter::OutputTransform, details::MsgCounter::Handler<Atomicity>>{
862 std::in_place, this, nMax} {}
Gaudi::Accumulators::PrintableCounter::PrintableCounter
PrintableCounter()=default
Gaudi::Accumulators::details::MsgCounter::Logger::msg
std::string msg
Definition: Counters.h:800
gaudirun.level
level
Definition: gaudirun.py:334

## Member Function Documentation

## ◆ operator++()

template<MSG::Level level, atomicity Atomicity = atomicity::full>

MsgCounter& Gaudi::Accumulators::details::MsgCounter< level, Atomicity >::operator++ | ( |  | ) |
| inline

Definition at line 863 of file Counters.h.

863 {
864 ( *this ) += true;
865 return *this;
866 }

## ◆ print() [1/6]

template<MSG::Level level, atomicity Atomicity = atomicity::full>

virtual std::ostream& Gaudi::Accumulators::PrintableCounter::print

prints the counter to a stream

## ◆ print() [2/6]

template<MSG::Level level, atomicity Atomicity = atomicity::full>

virtual std::ostream& Gaudi::Accumulators::PrintableCounter::print
| inline

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

Definition at line 619 of file Counters.h.

619 { return printImpl( o, tag ); }
Gaudi::Accumulators::details::MsgCounter::printImpl
stream & printImpl(stream &o, bool tableFormat) const
Definition: Counters.h:868

## ◆ print() [3/6]

template<MSG::Level level, atomicity Atomicity = atomicity::full>

virtual MsgStream& Gaudi::Accumulators::PrintableCounter::print
| inline

Definition at line 620 of file Counters.h.

620 { return printImpl( o, tag ); }
Gaudi::Accumulators::details::MsgCounter::printImpl
stream & printImpl(stream &o, bool tableFormat) const
Definition: Counters.h:868

## ◆ print() [4/6]

template<MSG::Level level, atomicity Atomicity = atomicity::full>

virtual MsgStream& Gaudi::Accumulators::PrintableCounter::print

## ◆ print() [5/6]

template<MSG::Level level, atomicity Atomicity = atomicity::full>

std::ostream& Gaudi::Accumulators::details::MsgCounter< level, Atomicity >::print | ( | std::ostream & | ,
|  | bool | tableFormat
| ) |  | const
| inline override virtual

prints the counter to a stream

Implements Gaudi::Accumulators::PrintableCounter.

Definition at line 872 of file Counters.h.

872 { return printImpl( os, tableFormat ); }
Gaudi::Accumulators::details::MsgCounter::printImpl
stream & printImpl(stream &o, bool tableFormat) const
Definition: Counters.h:868

## ◆ print() [6/6]

template<MSG::Level level, atomicity Atomicity = atomicity::full>

MsgStream& Gaudi::Accumulators::details::MsgCounter< level, Atomicity >::print | ( | MsgStream & | os,
|  | bool | tableFormat
| ) |  | const
| inline override virtual

Implements Gaudi::Accumulators::PrintableCounter.

Definition at line 873 of file Counters.h.

873 { return printImpl( os, tableFormat ); }
Gaudi::Accumulators::details::MsgCounter::printImpl
stream & printImpl(stream &o, bool tableFormat) const
Definition: Counters.h:868

## ◆ printImpl()

template<MSG::Level level, atomicity Atomicity = atomicity::full>
template<typename stream >

stream& Gaudi::Accumulators::details::MsgCounter< level, Atomicity >::printImpl | ( | stream & | o,
|  | bool | tableFormat
| ) |  | const
| inline

Definition at line 868 of file Counters.h.

868 {
869 return o << boost::format{tableFormat ? "|%|10d| |" : "#=%|-7lu|"} % this->value();
870 }
format
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:109
Gaudi::Accumulators::GenericAccumulator::value
OutputType value() const
Definition: Counters.h:355

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

- GaudiKernel/GaudiKernel/Counters.h