| The Gaudi Framework v32r1 (f65d50dc)

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

AveragingAccumulator. More...

`#include <GaudiKernel/Counters.h>`

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

## Public Member Functions
template<typename Result = fp_result_type<Arithmetic>>
auto | mean () 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::AveragingAccumulator< Arithmetic, Atomicity >

AveragingAccumulator.

An AveragingAccumulator is an Accumulator able to compute an average

See also
  Gaudi::Accumulators for detailed documentation

Definition at line 509 of file Counters.h.

## Member Function Documentation

## ◆ mean()

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

auto Gaudi::Accumulators::AveragingAccumulator< Arithmetic, Atomicity >::mean | ( |  | ) | const
| inline

Definition at line 512 of file Counters.h.

512 {
513 auto n = this->nEntries();
514 Result sum = this->sum();
515 return ( n > 0 ) ? static_cast<Result>( sum / n ) : Result{};
516 }
GaudiPluginService.cpluginsvc.n
n
Definition: cpluginsvc.py:210
GaudiPython.HistoUtils.nEntries
nEntries
Definition: HistoUtils.py:910

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

- GaudiKernel/GaudiKernel/Counters.h