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

WeightedSumAccumulator. More...

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

Inheritance diagram for Gaudi::Accumulators::WeightedSumAccumulator< Atomicity, Arithmetic >:
Collaboration diagram for Gaudi::Accumulators::WeightedSumAccumulator< Atomicity, Arithmetic >:

Public Member Functions

Arithmetic sum () const
Public Member Functions inherited from Gaudi::Accumulators::GenericAccumulator< std::pair< Arithmetic, Arithmetic >, Arithmetic, Atomicity, WeightedProduct >
GenericAccumulator operator+= (const InputType by)
GenericAccumulator & operator= (const GenericAccumulator &other)
OutputType value () const
void reset ()
void mergeAndReset (GenericAccumulator< InputType, Arithmetic, ato, WeightedProduct, Identity, VH > &other)
void operator+ (GenericAccumulator< InputType, Arithmetic, ato, WeightedProduct, Identity, VH > &&other)

Additional Inherited Members

Public Types inherited from Gaudi::Accumulators::GenericAccumulator< std::pair< Arithmetic, Arithmetic >, Arithmetic, Atomicity, WeightedProduct >
using InputType
using OutputType
using InternalType
using JSONStringEntriesType
Protected Member Functions inherited from Gaudi::Accumulators::GenericAccumulator< std::pair< Arithmetic, Arithmetic >, Arithmetic, Atomicity, WeightedProduct >
auto rawValue () const
Static Protected Member Functions inherited from Gaudi::Accumulators::GenericAccumulator< std::pair< Arithmetic, Arithmetic >, Arithmetic, Atomicity, WeightedProduct >
static Arithmetic extractJSONData (const nlohmann::json &j, const JSONStringEntriesType &entries)

Detailed Description

template<atomicity Atomicity, typename Arithmetic>
struct Gaudi::Accumulators::WeightedSumAccumulator< Atomicity, Arithmetic >

WeightedSumAccumulator.

A WeightedSumAccumulator is an Accumulator storing a weighted sum of values. It takes a pair (valueTuple, weight) and basically sums the product of the last item othe 2 part of its in put pair : weight and value

See also
Gaudi::Accumulators for detailed documentation

Definition at line 184 of file StaticHistogram.h.

Member Function Documentation

◆ sum()

template<atomicity Atomicity, typename Arithmetic>
Arithmetic Gaudi::Accumulators::WeightedSumAccumulator< Atomicity, Arithmetic >::sum ( ) const
inline

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