The Gaudi Framework  v31r0 (aeb156f0)
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 >:
Collaboration diagram for Gaudi::Accumulators::BinomialCounter< Arithmetic, Atomicity >:

Public Member Functions

template<typename stream >
stream & printImpl (stream &o, bool tableFormat) const
 
std::ostreamprint (std::ostream &o, bool tableFormat=false) const override
 prints the counter to a stream More...
 
MsgStreamprint (MsgStream &o, bool tableFormat=false) const override
 
template<typename stream >
stream & printImpl (stream &o, const std::string &tag) const
 
virtual std::ostreamprint (std::ostream &o, const std::string &tag) const override
 prints the counter to a stream in table format, with the given tag More...
 
virtual MsgStreamprint (MsgStream &o, const std::string &tag) const override
 
- Public Member Functions inherited from Gaudi::Accumulators::BufferableCounter< Arithmetic, Atomicity, Accumulator >
Buffer< Arithmetic, Accumulator > buffer ()
 
- 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 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::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
 
AccumulatorSetoperator+= (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 788 of file Counters.h.

Member Function Documentation

template<typename Arithmetic = double, atomicity Atomicity = atomicity::full>
std::ostream& Gaudi::Accumulators::BinomialCounter< Arithmetic, Atomicity >::print ( std::ostream ,
bool  tableFormat = false 
) const
inlineoverridevirtual

prints the counter to a stream

Implements Gaudi::Accumulators::PrintableCounter.

Definition at line 800 of file Counters.h.

800  {
801  return printImpl( o, tableFormat );
802  }
stream & printImpl(stream &o, bool tableFormat) const
Definition: Counters.h:793
template<typename Arithmetic = double, atomicity Atomicity = atomicity::full>
MsgStream& Gaudi::Accumulators::BinomialCounter< Arithmetic, Atomicity >::print ( MsgStream o,
bool  tableFormat = false 
) const
inlineoverridevirtual

Implements Gaudi::Accumulators::PrintableCounter.

Definition at line 803 of file Counters.h.

803 { return printImpl( o, tableFormat ); }
stream & printImpl(stream &o, bool tableFormat) const
Definition: Counters.h:793
template<typename Arithmetic = double, atomicity Atomicity = atomicity::full>
virtual std::ostream& Gaudi::Accumulators::BinomialCounter< Arithmetic, Atomicity >::print ( std::ostream o,
const std::string tag 
) const
inlineoverridevirtual

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

Reimplemented from Gaudi::Accumulators::PrintableCounter.

Definition at line 812 of file Counters.h.

812  {
813  return printImpl( o, tag );
814  }
stream & printImpl(stream &o, bool tableFormat) const
Definition: Counters.h:793
template<typename Arithmetic = double, atomicity Atomicity = atomicity::full>
virtual MsgStream& Gaudi::Accumulators::BinomialCounter< Arithmetic, Atomicity >::print ( MsgStream o,
const std::string tag 
) const
inlineoverridevirtual

Reimplemented from Gaudi::Accumulators::PrintableCounter.

Definition at line 815 of file Counters.h.

815 { return printImpl( o, tag ); }
stream & printImpl(stream &o, bool tableFormat) const
Definition: Counters.h:793
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 793 of file Counters.h.

793  {
794  auto fmt = ( tableFormat ? "|%|10d| |%|11.5g| |(%|#9.7g| +- %|-#8.7g|)%% |"
795  : "#=%|-7lu| Sum=%|-11.5g| Eff=|(%|#9.7g| +- %|-#8.6g|)%%|" );
796  return o << boost::format{fmt} % this->nEntries() % this->nTrueEntries() % ( this->efficiency() * 100 ) %
797  ( this->efficiencyErr() * 100 );
798  }
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:109
unsigned long nEntries() const
Definition: Counters.h:503
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 806 of file Counters.h.

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

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