CbmRoot
Loading...
Searching...
No Matches
boost::histogram::RootStyleProfileAccumulator< ValueType > Class Template Reference

A ROOT-style accumulator for the Boost-histogram profiles. More...

#include <Accumulators.h>

Public Types

using Value_t = ValueType
 
using ConstRef_t = const Value_t&
 
using Weight_t = weight_type<Value_t>
 

Public Member Functions

 RootStyleProfileAccumulator ()=default
 Default constructor.
 
template<class OtherValueType >
 RootStyleProfileAccumulator (const RootStyleProfileAccumulator< OtherValueType > &other)
 Copy constructor from the instances with other types.
 
 RootStyleProfileAccumulator (ConstRef_t sumWV, ConstRef_t sumWV2, ConstRef_t sumW, ConstRef_t sumW2)
 Constructor from the external counters.
 
void operator() (ConstRef_t v)
 Inserts sample with 1. weight.
 
void operator() (const Weight_t &w, ConstRef_t v)
 Inserts sample with weight.
 
RootStyleProfileAccumulatoroperator+= (const RootStyleProfileAccumulator &rhs)
 Adds another accumulator.
 
RootStyleProfileAccumulatoroperator*= (ConstRef_t s) noexcept
 Scales all entries by value.
 
bool operator== (const RootStyleProfileAccumulator &rhs) const noexcept
 Equality operator.
 
bool operator!= (const RootStyleProfileAccumulator &rhs) const noexcept
 Non-equality operator.
 
ConstRef_t GetSumW () const noexcept
 Returns sum of weights.
 
ConstRef_t GetSumW2 () const noexcept
 Returns sum of weight squares.
 
ConstRef_t GetSumWV () const noexcept
 Returns sum of products of weight multiplied by value.
 
ConstRef_t GetSumWV2 () const noexcept
 Returns sum of products of weight multiplied by squared value.
 
Value_t GetMean () const noexcept
 Returns the mean value.
 
Value_t GetEffCount () const noexcept
 Returns effective sum of values.
 
Value_t GetVariance () const noexcept
 Returns variance.
 
Value_t GetStdDev () const noexcept
 Returns standard deviation of the sample.
 
Value_t GetSEM () const noexcept
 Returns standard error of the mean.
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int)
 Serialization rule.
 

Private Attributes

Value_t fSumWV {}
 Sum of weight * value.
 
Value_t fSumWV2 {}
 Sum of weight * value * value.
 
Value_t fSumW {}
 Sum of weights.
 
Value_t fSumW2 {}
 Sum of squared weights.
 

Friends

class boost::serialization::access
 

Detailed Description

template<class ValueType>
class boost::histogram::RootStyleProfileAccumulator< ValueType >

A ROOT-style accumulator for the Boost-histogram profiles.

Template Parameters
ValueTypeType of the values

Definition at line 25 of file Accumulators.h.

Member Typedef Documentation

◆ ConstRef_t

template<class ValueType >
using boost::histogram::RootStyleProfileAccumulator< ValueType >::ConstRef_t = const Value_t&

Definition at line 28 of file Accumulators.h.

◆ Value_t

template<class ValueType >
using boost::histogram::RootStyleProfileAccumulator< ValueType >::Value_t = ValueType

Definition at line 27 of file Accumulators.h.

◆ Weight_t

template<class ValueType >
using boost::histogram::RootStyleProfileAccumulator< ValueType >::Weight_t = weight_type<Value_t>

Definition at line 29 of file Accumulators.h.

Constructor & Destructor Documentation

◆ RootStyleProfileAccumulator() [1/3]

template<class ValueType >
boost::histogram::RootStyleProfileAccumulator< ValueType >::RootStyleProfileAccumulator ( )
default

Default constructor.

◆ RootStyleProfileAccumulator() [2/3]

template<class ValueType >
template<class OtherValueType >
boost::histogram::RootStyleProfileAccumulator< ValueType >::RootStyleProfileAccumulator ( const RootStyleProfileAccumulator< OtherValueType > & other)
inline

Copy constructor from the instances with other types.

Definition at line 36 of file Accumulators.h.

◆ RootStyleProfileAccumulator() [3/3]

template<class ValueType >
boost::histogram::RootStyleProfileAccumulator< ValueType >::RootStyleProfileAccumulator ( ConstRef_t sumWV,
ConstRef_t sumWV2,
ConstRef_t sumW,
ConstRef_t sumW2 )
inline

Constructor from the external counters.

Parameters
sumWVSum of weight * value
sumWVSum of weight * value * value
sumWSum of weights
sumW2Sum of weights

Definition at line 49 of file Accumulators.h.

Member Function Documentation

◆ GetEffCount()

template<class ValueType >
Value_t boost::histogram::RootStyleProfileAccumulator< ValueType >::GetEffCount ( ) const
inlinenoexcept

◆ GetMean()

◆ GetSEM()

◆ GetStdDev()

template<class ValueType >
Value_t boost::histogram::RootStyleProfileAccumulator< ValueType >::GetStdDev ( ) const
inlinenoexcept

◆ GetSumW()

template<class ValueType >
ConstRef_t boost::histogram::RootStyleProfileAccumulator< ValueType >::GetSumW ( ) const
inlinenoexcept

Returns sum of weights.

Definition at line 103 of file Accumulators.h.

References boost::histogram::RootStyleProfileAccumulator< ValueType >::fSumW.

◆ GetSumW2()

template<class ValueType >
ConstRef_t boost::histogram::RootStyleProfileAccumulator< ValueType >::GetSumW2 ( ) const
inlinenoexcept

Returns sum of weight squares.

Definition at line 106 of file Accumulators.h.

References boost::histogram::RootStyleProfileAccumulator< ValueType >::fSumW2.

◆ GetSumWV()

template<class ValueType >
ConstRef_t boost::histogram::RootStyleProfileAccumulator< ValueType >::GetSumWV ( ) const
inlinenoexcept

Returns sum of products of weight multiplied by value.

Definition at line 109 of file Accumulators.h.

References boost::histogram::RootStyleProfileAccumulator< ValueType >::fSumWV.

◆ GetSumWV2()

template<class ValueType >
ConstRef_t boost::histogram::RootStyleProfileAccumulator< ValueType >::GetSumWV2 ( ) const
inlinenoexcept

Returns sum of products of weight multiplied by squared value.

Definition at line 112 of file Accumulators.h.

References boost::histogram::RootStyleProfileAccumulator< ValueType >::fSumWV2.

◆ GetVariance()

◆ operator!=()

template<class ValueType >
bool boost::histogram::RootStyleProfileAccumulator< ValueType >::operator!= ( const RootStyleProfileAccumulator< ValueType > & rhs) const
inlinenoexcept

Non-equality operator.

Definition at line 100 of file Accumulators.h.

References boost::histogram::RootStyleProfileAccumulator< ValueType >::operator==().

◆ operator()() [1/2]

◆ operator()() [2/2]

template<class ValueType >
void boost::histogram::RootStyleProfileAccumulator< ValueType >::operator() ( ConstRef_t v)
inline

Inserts sample with 1. weight.

Parameters
vSample

Definition at line 59 of file Accumulators.h.

References boost::histogram::RootStyleProfileAccumulator< ValueType >::operator()(), and v.

Referenced by boost::histogram::RootStyleProfileAccumulator< ValueType >::operator()().

◆ operator*=()

template<class ValueType >
RootStyleProfileAccumulator & boost::histogram::RootStyleProfileAccumulator< ValueType >::operator*= ( ConstRef_t s)
inlinenoexcept

◆ operator+=()

◆ operator==()

◆ serialize()

Friends And Related Symbol Documentation

◆ boost::serialization::access

template<class ValueType >
friend class boost::serialization::access
friend

Definition at line 130 of file Accumulators.h.

Member Data Documentation

◆ fSumW

◆ fSumW2

◆ fSumWV

◆ fSumWV2


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