| The Gaudi Framework v32r1 (f65d50dc)

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

BinomialAccumulator. More...

`#include <GaudiKernel/Counters.h>`

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

## Public Member Functions
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, atomicity Atomicity = atomicity::full>
struct Gaudi::Accumulators::BinomialAccumulator< Arithmetic, Atomicity >

BinomialAccumulator.

A BinomialAccumulator is an Accumulator able to compute the efficiency of a process data

See also
  Gaudi::Accumulators for detailed documentation

Definition at line 480 of file Counters.h.

## Member Function Documentation

## ◆ eff()

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

auto Gaudi::Accumulators::BinomialAccumulator< Arithmetic, Atomicity >::eff | ( |  | ) | const
| inline

Definition at line 489 of file Counters.h.

489 { return efficiency(); }
Gaudi::Accumulators::BinomialAccumulator::efficiency
auto efficiency() const
Definition: Counters.h:484

## ◆ effErr()

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

auto Gaudi::Accumulators::BinomialAccumulator< Arithmetic, Atomicity >::effErr | ( |  | ) | const
| inline

Definition at line 501 of file Counters.h.

501 { return efficiencyErr(); }
Gaudi::Accumulators::BinomialAccumulator::efficiencyErr
auto efficiencyErr() const
Definition: Counters.h:492

## ◆ efficiency()

template<typename Arithmetic , atomicity Atomicity = atomicity::full>
template<typename Result = fp_result_type<Arithmetic>>

auto Gaudi::Accumulators::BinomialAccumulator< Arithmetic, Atomicity >::efficiency | ( |  | ) | const
| inline

Definition at line 484 of file Counters.h.

484 {
485 auto nbEntries = nEntries();
486 if ( 1 > nbEntries ) return Result{-1};
487 return static_cast<Result>( this->nTrueEntries() ) / nbEntries;
488 }
Gaudi::Accumulators::BinomialAccumulator::nEntries
unsigned long nEntries() const
Definition: Counters.h:481

## ◆ efficiencyErr()

template<typename Arithmetic , atomicity Atomicity = atomicity::full>
template<typename Result = fp_result_type<Arithmetic>>

auto Gaudi::Accumulators::BinomialAccumulator< Arithmetic, Atomicity >::efficiencyErr | ( |  | ) | const
| inline

Definition at line 492 of file Counters.h.

492 {
493 // Note the usage of using, aiming at using the std version of sqrt by default, without preventing
494 // more specialized versions to be used via ADL (see http://en.cppreference.com/w/cpp/language/adl)
495 using Gaudi::Accumulators::sqrt;
496 using std::sqrt;
497 auto nbEntries = nEntries();
498 if ( 1 > nbEntries ) return Result{-1};
499 return sqrt( static_cast<Result>( this->nTrueEntries() * this->nFalseEntries() ) / nbEntries ) / nbEntries;
500 }
Gaudi::Accumulators::sqrt
auto sqrt(std::chrono::duration< Rep, Period > d)
sqrt for std::chrono::duration
Definition: Counters.h:28
std::sqrt
T sqrt(T... args)
Gaudi::Accumulators::BinomialAccumulator::nEntries
unsigned long nEntries() const
Definition: Counters.h:481

## ◆ nEntries()

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

unsigned long Gaudi::Accumulators::BinomialAccumulator< Arithmetic, Atomicity >::nEntries | ( |  | ) | const
| inline

Definition at line 481 of file Counters.h.

481 { return this->nTrueEntries() + this->nFalseEntries(); };

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

- GaudiKernel/GaudiKernel/Counters.h