The Gaudi Framework  v41r0 (bdbe7744)
Loading...
Searching...
No Matches
Gaudi::Accumulators::AveragingAccumulatorBase< Atomicity, Arithmetic, CountAcc, SumAcc > Struct Template Reference

AveragingAccumulatorBase. More...

#include </builds/gaudi/Gaudi/GaudiKernel/include/Gaudi/Accumulators.h>

Inheritance diagram for Gaudi::Accumulators::AveragingAccumulatorBase< Atomicity, Arithmetic, CountAcc, SumAcc >:
Collaboration diagram for Gaudi::Accumulators::AveragingAccumulatorBase< Atomicity, Arithmetic, CountAcc, SumAcc >:

Public Member Functions

template<typename Result = fp_result_type<Arithmetic>>
auto mean () const
Public Member Functions inherited from Gaudi::Accumulators::AccumulatorSet< Arithmetic, Atomicity, CountAcc< Atomicity, Arithmetic >::InputType, CountAcc, SumAcc >
constexpr AccumulatorSet ()=default
AccumulatorSet & operator+= (const InputType by)
OutputType value () const
void reset ()
void mergeAndReset (AccumulatorSet< Arithmetic, Ato, InputType, CountAcc... > &other)
void operator+ (AccumulatorSet< Arithmetic, Ato, InputType, CountAcc... > &&other)
void operator++ ()=delete

Additional Inherited Members

Public Types inherited from Gaudi::Accumulators::AccumulatorSet< Arithmetic, Atomicity, CountAcc< Atomicity, Arithmetic >::InputType, CountAcc, SumAcc >
using InputType
using OutputType
using InternalType
using JSONStringEntriesType
Static Protected Member Functions inherited from Gaudi::Accumulators::AccumulatorSet< Arithmetic, Atomicity, CountAcc< Atomicity, Arithmetic >::InputType, CountAcc, SumAcc >
static InternalType extractJSONData (const nlohmann::json &j, const JSONStringEntriesType &entries)

Detailed Description

template<atomicity Atomicity, typename Arithmetic, template< atomicity, typename > typename CountAcc, template< atomicity, typename > typename SumAcc>
struct Gaudi::Accumulators::AveragingAccumulatorBase< Atomicity, Arithmetic, CountAcc, SumAcc >

AveragingAccumulatorBase.

An AveragingAccumulator is an Accumulator able to compute an average This Base class is still templated on the counting and summing accumulators

See also
Gaudi::Accumulators for detailed documentation

Definition at line 770 of file Accumulators.h.

Member Function Documentation

◆ mean()

template<atomicity Atomicity, typename Arithmetic, template< atomicity, typename > typename CountAcc, template< atomicity, typename > typename SumAcc>
template<typename Result = fp_result_type<Arithmetic>>
auto Gaudi::Accumulators::AveragingAccumulatorBase< Atomicity, Arithmetic, CountAcc, SumAcc >::mean ( ) const
inline

Definition at line 778 of file Accumulators.h.

778 {
779 auto n = this->nEntries();
780 Result sum = this->sum();
781 return ( n > 0 ) ? static_cast<Result>( sum / n ) : Result{};
782 }

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