| The Gaudi Framework v32r1 (f65d50dc)

Public Member Functions | List of all members
Gaudi::Accumulators::BinomialCounter< Arithmetic, Atomicity > Struct Template Reference

A counter dealing with binomial data. More...

`#include <GaudiKernel/Counters.h>`

Inheritance diagram for Gaudi::Accumulators::BinomialCounter< Arithmetic, Atomicity >:
[legend]
Collaboration diagram for Gaudi::Accumulators::BinomialCounter< Arithmetic, Atomicity >:
[legend]

## Public Member Functions
template<typename stream >
stream & | printImpl (stream &o, bool tableFormat) const
std::ostream & | print (std::ostream &o, bool tableFormat=false) const override
| prints the counter to a stream More...
MsgStream & | print (MsgStream &o, bool tableFormat=false) const override
template<typename stream >
stream & | printImpl (stream &o, const std::string &tag) const
std::ostream & | print (std::ostream &o, const std::string &tag) const override
| prints the counter to a stream in table format, with the given tag More...
MsgStream & | print (MsgStream &o, const std::string &tag) const override
bool | toBePrinted () const override
| hint whether we should print that counter or not. More...
Public Member Functions inherited from Gaudi::Accumulators::BufferableCounter< Arithmetic, Atomicity, Accumulator >
Buffer< Arithmetic, Accumulator > | buffer ()
| PrintableCounter ()=default
template<class OWNER >
| PrintableCounter (OWNER *o, const std::string &tag)
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
std::string | toString () const
| get a string representation More...
Public Member Functions inherited from Gaudi::Accumulators::BinomialAccumulator< Arithmetic, Atomicity >
unsigned long | nEntries () const
template<typename Result = fp_result_type<Arithmetic>>
auto | efficiency () const
auto | eff () const
template<typename Result = fp_result_type<Arithmetic>>
auto | efficiencyErr () const
auto | effErr () const
Public Member Functions inherited from Gaudi::Accumulators::AccumulatorSet< Arithmetic, Atomicity, Bases >
constexpr | AccumulatorSet ()=default
AccumulatorSet & | operator+= (const InputType by)
OutputType | value () const
void | reset ()
template<atomicity Ato>
void | mergeAndReset (AccumulatorSet< Arithmetic, Ato, Bases... > &&other)

## Additional Inherited Members
Public Types inherited from Gaudi::Accumulators::AccumulatorSet< Arithmetic, Atomicity, Bases >
using | InputType = Arithmetic
using | OutputType = std::tuple< typename Bases< Arithmetic, Atomicity >::OutputType... >
Protected Member Functions inherited from Gaudi::Accumulators::AccumulatorSet< Arithmetic, Atomicity, Bases >
void | reset (const std::tuple< typename Bases< Arithmetic, Atomicity >::OutputType... > &t)

## Detailed Description

### template<typename Arithmetic = double, atomicity Atomicity = atomicity::full>
struct Gaudi::Accumulators::BinomialCounter< Arithmetic, Atomicity >

A counter dealing with binomial data.

See also
  Gaudi::Accumulators for detailed documentation

Definition at line 768 of file Counters.h.

## Member Function Documentation

## ◆ print() [1/4]

template<typename Arithmetic = double, atomicity Atomicity = atomicity::full>

std::ostream& Gaudi::Accumulators::BinomialCounter< Arithmetic, Atomicity >::print | ( | std::ostream & | ,
|  | bool | tableFormat = `false`
| ) |  | const
| inline override virtual

prints the counter to a stream

Implements Gaudi::Accumulators::PrintableCounter.

Definition at line 780 of file Counters.h.

780 {
781 return printImpl( o, tableFormat );
782 }
Gaudi::Accumulators::BinomialCounter::printImpl
stream & printImpl(stream &o, bool tableFormat) const
Definition: Counters.h:773

## ◆ print() [2/4]

template<typename Arithmetic = double, atomicity Atomicity = atomicity::full>

MsgStream& Gaudi::Accumulators::BinomialCounter< Arithmetic, Atomicity >::print | ( | MsgStream & | o,
|  | bool | tableFormat = `false`
| ) |  | const
| inline override virtual

Implements Gaudi::Accumulators::PrintableCounter.

Definition at line 783 of file Counters.h.

783 { return printImpl( o, tableFormat ); }
Gaudi::Accumulators::BinomialCounter::printImpl
stream & printImpl(stream &o, bool tableFormat) const
Definition: Counters.h:773

## ◆ print() [3/4]

template<typename Arithmetic = double, atomicity Atomicity = atomicity::full>

std::ostream& Gaudi::Accumulators::BinomialCounter< Arithmetic, Atomicity >::print | ( | std::ostream & | o,
|  | const std::string & | tag
| ) |  | const
| inline override virtual

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

Reimplemented from Gaudi::Accumulators::PrintableCounter.

Definition at line 792 of file Counters.h.

792 { return printImpl( o, tag ); }
Gaudi::Accumulators::BinomialCounter::printImpl
stream & printImpl(stream &o, bool tableFormat) const
Definition: Counters.h:773

## ◆ print() [4/4]

template<typename Arithmetic = double, atomicity Atomicity = atomicity::full>

MsgStream& Gaudi::Accumulators::BinomialCounter< Arithmetic, Atomicity >::print | ( | MsgStream & | o,
|  | const std::string & | tag
| ) |  | const
| inline override virtual

Reimplemented from Gaudi::Accumulators::PrintableCounter.

Definition at line 793 of file Counters.h.

793 { return printImpl( o, tag ); }
Gaudi::Accumulators::BinomialCounter::printImpl
stream & printImpl(stream &o, bool tableFormat) const
Definition: Counters.h:773

## ◆ printImpl() [1/2]

template<typename Arithmetic = double, atomicity Atomicity = atomicity::full>
template<typename stream >

stream& Gaudi::Accumulators::BinomialCounter< Arithmetic, Atomicity >::printImpl | ( | stream & | o,
|  | bool | tableFormat
| ) |  | const
| inline

Definition at line 773 of file Counters.h.

773 {
774 auto fmt = ( tableFormat ? "|%|10d| |%|11.5g| |(%|#9.7g| +- %|-#8.7g|)%% |"
775 : "#=%|-7lu| Sum=%|-11.5g| Eff=|(%|#9.7g| +- %|-#8.6g|)%%|" );
776 return o << boost::format{fmt} % this->nEntries() % this->nTrueEntries() % ( this->efficiency() * 100 ) %
777 ( this->efficiencyErr() * 100 );
778 }
format
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:109
Gaudi::Accumulators::BinomialAccumulator::efficiencyErr
auto efficiencyErr() const
Definition: Counters.h:492
Gaudi::Accumulators::BinomialAccumulator::efficiency
auto efficiency() const
Definition: Counters.h:484
Gaudi::Accumulators::BinomialAccumulator::nEntries
unsigned long nEntries() const
Definition: Counters.h:481

## ◆ printImpl() [2/2]

template<typename Arithmetic = double, atomicity Atomicity = atomicity::full>
template<typename stream >

stream& Gaudi::Accumulators::BinomialCounter< Arithmetic, Atomicity >::printImpl | ( | stream & | o,
|  | const std::string & | tag
| ) |  | const
| inline

Definition at line 786 of file Counters.h.

786 {
787 // override default print to add a '*' in from of the name
788 o << boost::format{" |*%|-48.48s|%|50t|"} % ( "\"" + tag + "\"" );
789 return print( o, true );
790 }
format
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:109
Gaudi::Accumulators::BinomialCounter::print
std::ostream & print(std::ostream &o, bool tableFormat=false) const override
prints the counter to a stream
Definition: Counters.h:780

## ◆ toBePrinted()

template<typename Arithmetic = double, atomicity Atomicity = atomicity::full>

bool Gaudi::Accumulators::BinomialCounter< Arithmetic, Atomicity >::toBePrinted | ( |  | ) | const
| inline override virtual

hint whether we should print that counter or not.

Typically empty counters may not be printed

Reimplemented from Gaudi::Accumulators::PrintableCounter.

Definition at line 794 of file Counters.h.

794 { return this->nEntries() > 0; }
Gaudi::Accumulators::BinomialAccumulator::nEntries
unsigned long nEntries() const
Definition: Counters.h:481

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

- GaudiKernel/GaudiKernel/Counters.h