The Gaudi Framework  v41r0 (bdbe7744)
Loading...
Searching...
No Matches
Gaudi::Accumulators::AccumulatorSet< Arithmetic, Atomicity, InputTypeT, Bases > Class Template Reference

AccumulatorSet is an Accumulator that holds a set of Accumulators templated by same Arithmetic and Atomicity and increase them altogether. More...

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

Inheritance diagram for Gaudi::Accumulators::AccumulatorSet< Arithmetic, Atomicity, InputTypeT, Bases >:
Collaboration diagram for Gaudi::Accumulators::AccumulatorSet< Arithmetic, Atomicity, InputTypeT, Bases >:

Public Types

using InputType = InputTypeT
using OutputType = std::tuple<typename Bases<Atomicity, Arithmetic>::OutputType...>
using InternalType = std::tuple<typename Bases<Atomicity, Arithmetic>::InternalType...>
using JSONStringEntriesType = std::tuple<typename Bases<Atomicity, Arithmetic>::JSONStringEntriesType...>

Public Member Functions

constexpr AccumulatorSet ()=default
template<atomicity ato>
 AccumulatorSet (construct_empty_t, const AccumulatorSet< Arithmetic, ato, InputType, Bases... > &)
 constructor of an empty AccumulatorSet, copying the (non existent) config from another GenericAccumulator
AccumulatorSet & operator+= (const InputType by)
OutputType value () const
void reset ()
template<atomicity Ato>
void mergeAndReset (AccumulatorSet< Arithmetic, Ato, InputType, Bases... > &other)
template<atomicity Ato>
void operator+ (AccumulatorSet< Arithmetic, Ato, InputType, Bases... > &&other)
void operator++ ()=delete
void operator++ (int)=delete

Protected Member Functions

 AccumulatorSet (const InternalType &t)
void reset (const InternalType &t)

Static Protected Member Functions

static InternalType extractJSONData (const nlohmann::json &j, const JSONStringEntriesType &entries)

Static Private Member Functions

template<size_t... Is>
static InternalType extractJSONDataHelper (const nlohmann::json &j, const JSONStringEntriesType &entries, std::index_sequence< Is... >)
static InternalType extractJSONDataHelper (const nlohmann::json &j, typename Bases< Atomicity, Arithmetic >::JSONStringEntriesType... entries)

Detailed Description

template<typename Arithmetic, atomicity Atomicity, typename InputTypeT = Arithmetic, template< atomicity, typename > class... Bases>
class Gaudi::Accumulators::AccumulatorSet< Arithmetic, Atomicity, InputTypeT, Bases >

AccumulatorSet is an Accumulator that holds a set of Accumulators templated by same Arithmetic and Atomicity and increase them altogether.

See also
Gaudi::Accumulators for detailed documentation

Definition at line 536 of file Accumulators.h.

Member Typedef Documentation

◆ InputType

template<typename Arithmetic, atomicity Atomicity, typename InputTypeT = Arithmetic, template< atomicity, typename > class... Bases>
using Gaudi::Accumulators::AccumulatorSet< Arithmetic, Atomicity, InputTypeT, Bases >::InputType = InputTypeT

Definition at line 538 of file Accumulators.h.

◆ InternalType

template<typename Arithmetic, atomicity Atomicity, typename InputTypeT = Arithmetic, template< atomicity, typename > class... Bases>
using Gaudi::Accumulators::AccumulatorSet< Arithmetic, Atomicity, InputTypeT, Bases >::InternalType = std::tuple<typename Bases<Atomicity, Arithmetic>::InternalType...>

Definition at line 540 of file Accumulators.h.

◆ JSONStringEntriesType

template<typename Arithmetic, atomicity Atomicity, typename InputTypeT = Arithmetic, template< atomicity, typename > class... Bases>
using Gaudi::Accumulators::AccumulatorSet< Arithmetic, Atomicity, InputTypeT, Bases >::JSONStringEntriesType = std::tuple<typename Bases<Atomicity, Arithmetic>::JSONStringEntriesType...>

Definition at line 541 of file Accumulators.h.

◆ OutputType

template<typename Arithmetic, atomicity Atomicity, typename InputTypeT = Arithmetic, template< atomicity, typename > class... Bases>
using Gaudi::Accumulators::AccumulatorSet< Arithmetic, Atomicity, InputTypeT, Bases >::OutputType = std::tuple<typename Bases<Atomicity, Arithmetic>::OutputType...>

Definition at line 539 of file Accumulators.h.

Constructor & Destructor Documentation

◆ AccumulatorSet() [1/3]

template<typename Arithmetic, atomicity Atomicity, typename InputTypeT = Arithmetic, template< atomicity, typename > class... Bases>
Gaudi::Accumulators::AccumulatorSet< Arithmetic, Atomicity, InputTypeT, Bases >::AccumulatorSet ( )
constexprdefault

◆ AccumulatorSet() [2/3]

template<typename Arithmetic, atomicity Atomicity, typename InputTypeT = Arithmetic, template< atomicity, typename > class... Bases>
template<atomicity ato>
Gaudi::Accumulators::AccumulatorSet< Arithmetic, Atomicity, InputTypeT, Bases >::AccumulatorSet ( construct_empty_t ,
const AccumulatorSet< Arithmetic, ato, InputType, Bases... > &  )
inline

constructor of an empty AccumulatorSet, copying the (non existent) config from another GenericAccumulator

Definition at line 545 of file Accumulators.h.

546 : AccumulatorSet() {}
constexpr AccumulatorSet()=default

◆ AccumulatorSet() [3/3]

template<typename Arithmetic, atomicity Atomicity, typename InputTypeT = Arithmetic, template< atomicity, typename > class... Bases>
Gaudi::Accumulators::AccumulatorSet< Arithmetic, Atomicity, InputTypeT, Bases >::AccumulatorSet ( const InternalType & t)
inlineprotected

Definition at line 577 of file Accumulators.h.

577: AccumulatorSet() { reset( t ); }
AccumulatorSet is an Accumulator that holds a set of Accumulators templated by same Arithmetic and At...

Member Function Documentation

◆ extractJSONData()

template<typename Arithmetic, atomicity Atomicity, typename InputTypeT = Arithmetic, template< atomicity, typename > class... Bases>
InternalType Gaudi::Accumulators::AccumulatorSet< Arithmetic, Atomicity, InputTypeT, Bases >::extractJSONData ( const nlohmann::json & j,
const JSONStringEntriesType & entries )
inlinestaticprotected

Definition at line 581 of file Accumulators.h.

581 {
583 }
static InternalType extractJSONDataHelper(const nlohmann::json &j, const JSONStringEntriesType &entries, std::index_sequence< Is... >)

◆ extractJSONDataHelper() [1/2]

template<typename Arithmetic, atomicity Atomicity, typename InputTypeT = Arithmetic, template< atomicity, typename > class... Bases>
template<size_t... Is>
InternalType Gaudi::Accumulators::AccumulatorSet< Arithmetic, Atomicity, InputTypeT, Bases >::extractJSONDataHelper ( const nlohmann::json & j,
const JSONStringEntriesType & entries,
std::index_sequence< Is... >  )
inlinestaticprivate

Definition at line 587 of file Accumulators.h.

588 {
590 }

◆ extractJSONDataHelper() [2/2]

template<typename Arithmetic, atomicity Atomicity, typename InputTypeT = Arithmetic, template< atomicity, typename > class... Bases>
InternalType Gaudi::Accumulators::AccumulatorSet< Arithmetic, Atomicity, InputTypeT, Bases >::extractJSONDataHelper ( const nlohmann::json & j,
typename Bases< Atomicity, Arithmetic >::JSONStringEntriesType... entries )
inlinestaticprivate

Definition at line 592 of file Accumulators.h.

593 {
595 }

◆ mergeAndReset()

template<typename Arithmetic, atomicity Atomicity, typename InputTypeT = Arithmetic, template< atomicity, typename > class... Bases>
template<atomicity Ato>
void Gaudi::Accumulators::AccumulatorSet< Arithmetic, Atomicity, InputTypeT, Bases >::mergeAndReset ( AccumulatorSet< Arithmetic, Ato, InputType, Bases... > & other)
inline

Definition at line 564 of file Accumulators.h.

564 {
566 }

◆ operator+()

template<typename Arithmetic, atomicity Atomicity, typename InputTypeT = Arithmetic, template< atomicity, typename > class... Bases>
template<atomicity Ato>
void Gaudi::Accumulators::AccumulatorSet< Arithmetic, Atomicity, InputTypeT, Bases >::operator+ ( AccumulatorSet< Arithmetic, Ato, InputType, Bases... > && other)
inline

Definition at line 568 of file Accumulators.h.

568 {
570 }

◆ operator++() [1/2]

template<typename Arithmetic, atomicity Atomicity, typename InputTypeT = Arithmetic, template< atomicity, typename > class... Bases>
void Gaudi::Accumulators::AccumulatorSet< Arithmetic, Atomicity, InputTypeT, Bases >::operator++ ( )
delete

◆ operator++() [2/2]

template<typename Arithmetic, atomicity Atomicity, typename InputTypeT = Arithmetic, template< atomicity, typename > class... Bases>
void Gaudi::Accumulators::AccumulatorSet< Arithmetic, Atomicity, InputTypeT, Bases >::operator++ ( int )
delete

◆ operator+=()

template<typename Arithmetic, atomicity Atomicity, typename InputTypeT = Arithmetic, template< atomicity, typename > class... Bases>
AccumulatorSet & Gaudi::Accumulators::AccumulatorSet< Arithmetic, Atomicity, InputTypeT, Bases >::operator+= ( const InputType by)
inline

Definition at line 555 of file Accumulators.h.

555 {
557 return *this;
558 }

◆ reset() [1/2]

template<typename Arithmetic, atomicity Atomicity, typename InputTypeT = Arithmetic, template< atomicity, typename > class... Bases>
void Gaudi::Accumulators::AccumulatorSet< Arithmetic, Atomicity, InputTypeT, Bases >::reset ( )
inline

Definition at line 562 of file Accumulators.h.

◆ reset() [2/2]

template<typename Arithmetic, atomicity Atomicity, typename InputTypeT = Arithmetic, template< atomicity, typename > class... Bases>
void Gaudi::Accumulators::AccumulatorSet< Arithmetic, Atomicity, InputTypeT, Bases >::reset ( const InternalType & t)
inlineprotected

Definition at line 578 of file Accumulators.h.

578 {
579 std::apply( [this]( const auto&... i ) { ( this->Bases<Atomicity, Arithmetic>::reset( i ), ... ); }, t );
580 }

◆ value()

template<typename Arithmetic, atomicity Atomicity, typename InputTypeT = Arithmetic, template< atomicity, typename > class... Bases>
OutputType Gaudi::Accumulators::AccumulatorSet< Arithmetic, Atomicity, InputTypeT, Bases >::value ( ) const
inline

Definition at line 561 of file Accumulators.h.


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