The Gaudi Framework  master (ff829712)
Loading...
Searching...
No Matches
StatEntity Class Reference

backward compatible StatEntity class. More...

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

Inheritance diagram for StatEntity:
Collaboration diagram for StatEntity:

Public Types

using AccParent
 
using BinomialAccParent = Gaudi::Accumulators::BinomialAccumulator<Gaudi::Accumulators::atomicity::full, double>
 
- Public Types inherited from Gaudi::Accumulators::AccumulatorSet< double, Gaudi::Accumulators::atomicity::full, double, Gaudi::Accumulators::StatAccumulator, Gaudi::Accumulators::BinomialAccumulator >
using InputType
 
using OutputType
 
using InternalType
 
using JSONStringEntriesType
 
- Public Types inherited from Gaudi::Accumulators::AccumulatorSet< Arithmetic, Atomicity, Arithmetic, SigmaAccumulator, MinAccumulator, MaxAccumulator >
using InputType
 
using OutputType
 
using InternalType
 
using JSONStringEntriesType
 
- Public Types inherited from Gaudi::Accumulators::AccumulatorSet< Arithmetic, Atomicity, InputTypeT, Bases >
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

 StatEntity ()=default
 the constructor with automatic registration in the owner's counter map
 
 StatEntity (const unsigned long entries, const double flag, const double flag2, const double minFlag, const double maxFlag)
 
void operator= (double by)
 
StatEntityoperator-= (double by)
 
StatEntityoperator++ ()
 
StatEntity operator++ (int)
 
StatEntityoperator-- ()
 
StatEntity operator-- (int)
 
bool operator< (const StatEntity &se) const
 
StatEntityoperator+= (double by)
 
StatEntityoperator+= (StatEntity by)
 
unsigned long add (const double v)
 
unsigned long addFlag (const double v)
 
double Sum () const
 
double Mean () const
 
double MeanErr () const
 
double rms () const
 
double Rms () const
 
double RMS () const
 
double Eff () const
 
double Min () const
 
double Max () const
 
double flag () const
 
double flag2 () const
 
double flagMean () const
 
double flagRMS () const
 
double flagMeanErr () const
 
double flagMin () const
 
double flagMax () const
 
template<typename stream>
stream & printFormattedImpl (stream &o, const std::string &format) const
 
std::ostream & printFormatted (std::ostream &o, const std::string &format) const
 
MsgStreamprintFormatted (MsgStream &o, const std::string &format) const
 
template<typename stream>
stream & printImpl (stream &o, bool tableFormat, std::string_view name, bool flag, std::string_view fmtHead) const
 
std::ostream & print (std::ostream &o, bool tableFormat, std::string_view name, bool flag=true, std::string_view fmtHead="%|-48.48s|%|27t|") const
 
MsgStreamprint (MsgStream &o, bool tableFormat, std::string_view name, bool flag=true, std::string_view fmtHead="%|-48.48s|%|27t|") const
 
virtual std::ostream & print (std::ostream &o, std::string_view tag) const override
 prints the counter to a stream in table format, with the given tag
 
virtual MsgStreamprint (MsgStream &o, std::string_view tag) const override
 
std::ostream & print (std::ostream &o, bool tableFormat=false) const override
 prints the counter to a stream
 
MsgStreamprint (MsgStream &o, bool tableFormat=false) const override
 
std::string toString () const
 
std::ostream & fillStream (std::ostream &o) const
 
MsgStreamfillStream (MsgStream &o) const
 
void reset ()
 
void reset (const InternalType &t)
 
- Public Member Functions inherited from Gaudi::Accumulators::PrintableCounter
 PrintableCounter ()=default
 
virtual ~PrintableCounter ()=default
 destructor
 
template<typename stream>
stream & printImpl (stream &s, std::string_view tag) const
 
virtual bool toBePrinted () const
 hint whether we should print that counter or not.
 
std::string toString () const
 get a string representation
 
- Public Member Functions inherited from Gaudi::Accumulators::AccumulatorSet< double, Gaudi::Accumulators::atomicity::full, double, Gaudi::Accumulators::StatAccumulator, Gaudi::Accumulators::BinomialAccumulator >
constexpr AccumulatorSet ()=default
 
 AccumulatorSet (construct_empty_t, const AccumulatorSet< double, ato, InputType, Gaudi::Accumulators::StatAccumulator... > &)
 constructor of an empty AccumulatorSet, copying the (non existent) config from another GenericAccumulator
 
AccumulatorSetoperator+= (const InputType by)
 
OutputType value () const
 
void reset ()
 
void mergeAndReset (AccumulatorSet< double, Ato, InputType, Gaudi::Accumulators::StatAccumulator... > &other)
 
void operator+ (AccumulatorSet< double, Ato, InputType, Gaudi::Accumulators::StatAccumulator... > &&other)
 
constexpr AccumulatorSet ()=default
 
 AccumulatorSet (construct_empty_t, const AccumulatorSet< double, ato, InputType, Gaudi::Accumulators::StatAccumulator... > &)
 constructor of an empty AccumulatorSet, copying the (non existent) config from another GenericAccumulator
 
AccumulatorSetoperator+= (const InputType by)
 
OutputType value () const
 
void reset ()
 
void mergeAndReset (AccumulatorSet< double, Ato, InputType, Gaudi::Accumulators::StatAccumulator... > &other)
 
void operator+ (AccumulatorSet< double, Ato, InputType, Gaudi::Accumulators::StatAccumulator... > &&other)
 
- Public Member Functions inherited from Gaudi::Accumulators::AccumulatorSet< Arithmetic, Atomicity, Arithmetic, SigmaAccumulator, MinAccumulator, MaxAccumulator >
constexpr AccumulatorSet ()=default
 
 AccumulatorSet (construct_empty_t, const AccumulatorSet< Arithmetic, ato, InputType, SigmaAccumulator... > &)
 constructor of an empty AccumulatorSet, copying the (non existent) config from another GenericAccumulator
 
AccumulatorSetoperator+= (const InputType by)
 
OutputType value () const
 
void reset ()
 
void mergeAndReset (AccumulatorSet< Arithmetic, Ato, InputType, SigmaAccumulator... > &other)
 
void operator+ (AccumulatorSet< Arithmetic, Ato, InputType, SigmaAccumulator... > &&other)
 
constexpr AccumulatorSet ()=default
 
 AccumulatorSet (construct_empty_t, const AccumulatorSet< Arithmetic, ato, InputType, SigmaAccumulator... > &)
 constructor of an empty AccumulatorSet, copying the (non existent) config from another GenericAccumulator
 
AccumulatorSetoperator+= (const InputType by)
 
OutputType value () const
 
void reset ()
 
void mergeAndReset (AccumulatorSet< Arithmetic, Ato, InputType, SigmaAccumulator... > &other)
 
void operator+ (AccumulatorSet< Arithmetic, Ato, InputType, SigmaAccumulator... > &&other)
 
- Public Member Functions inherited from Gaudi::Accumulators::SigmaAccumulatorBase< Atomicity, Arithmetic, AveragingAccumulator, SquareAccumulator >
auto biased_sample_variance () const
 
auto unbiased_sample_variance () const
 
auto standard_deviation () const
 
Arithmetic rms () const
 
auto meanErr () const
 
auto biased_sample_variance () const
 
auto unbiased_sample_variance () const
 
auto standard_deviation () const
 
Arithmetic rms () const
 
auto meanErr () const
 
- Public Member Functions inherited from Gaudi::Accumulators::AccumulatorSet< Arithmetic, Atomicity, InputTypeT, Bases >
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
 
AccumulatorSetoperator+= (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)
 

Static Public Member Functions

static bool effCounter (std::string_view name)
 
static StatEntity fromJSON (const nlohmann::json &j)
 

Static Public Attributes

static const std::string typeString { "statentity" }
 

Static Private Member Functions

static constexpr bool essentiallyEqual (double const a, double const b)
 

Friends

void reset (StatEntity &s)
 
void to_json (nlohmann::json &j, StatEntity const &s)
 Basic JSON export for Gaudi::Monitoring::Hub support.
 

Additional Inherited Members

- Protected Member Functions inherited from Gaudi::Accumulators::AccumulatorSet< double, Gaudi::Accumulators::atomicity::full, double, Gaudi::Accumulators::StatAccumulator, Gaudi::Accumulators::BinomialAccumulator >
 AccumulatorSet (const InternalType &t)
 
void reset (const InternalType &t)
 
 AccumulatorSet (const InternalType &t)
 
void reset (const InternalType &t)
 
- Protected Member Functions inherited from Gaudi::Accumulators::AccumulatorSet< Arithmetic, Atomicity, Arithmetic, SigmaAccumulator, MinAccumulator, MaxAccumulator >
 AccumulatorSet (const InternalType &t)
 
void reset (const InternalType &t)
 
 AccumulatorSet (const InternalType &t)
 
void reset (const InternalType &t)
 
- Protected Member Functions inherited from Gaudi::Accumulators::AccumulatorSet< Arithmetic, Atomicity, InputTypeT, Bases >
 AccumulatorSet (const InternalType &t)
 
void reset (const InternalType &t)
 
- Static Protected Member Functions inherited from Gaudi::Accumulators::AccumulatorSet< double, Gaudi::Accumulators::atomicity::full, double, Gaudi::Accumulators::StatAccumulator, Gaudi::Accumulators::BinomialAccumulator >
static InternalType extractJSONData (const nlohmann::json &j, const JSONStringEntriesType &entries)
 
static InternalType extractJSONData (const nlohmann::json &j, const JSONStringEntriesType &entries)
 
- Static Protected Member Functions inherited from Gaudi::Accumulators::AccumulatorSet< Arithmetic, Atomicity, Arithmetic, SigmaAccumulator, MinAccumulator, MaxAccumulator >
static InternalType extractJSONData (const nlohmann::json &j, const JSONStringEntriesType &entries)
 
static InternalType extractJSONData (const nlohmann::json &j, const JSONStringEntriesType &entries)
 
- Static Protected Member Functions inherited from Gaudi::Accumulators::AccumulatorSet< Arithmetic, Atomicity, InputTypeT, Bases >
static InternalType extractJSONData (const nlohmann::json &j, const JSONStringEntriesType &entries)
 

Detailed Description

backward compatible StatEntity class.

Should not be used. Only here for backward compatibility

Definition at line 20 of file StatEntity.h.

Member Typedef Documentation

◆ AccParent

Initial value:
AccumulatorSet is an Accumulator that holds a set of Accumulators templated by same Arithmetic and At...
AccumulatorSet< Arithmetic, Atomicity, Arithmetic, SigmaAccumulator, MinAccumulator, MaxAccumulator > StatAccumulator
StatAccumulator.

Definition at line 26 of file StatEntity.h.

◆ BinomialAccParent

Constructor & Destructor Documentation

◆ StatEntity() [1/2]

StatEntity::StatEntity ( )
default

the constructor with automatic registration in the owner's counter map

◆ StatEntity() [2/2]

StatEntity::StatEntity ( const unsigned long entries,
const double flag,
const double flag2,
const double minFlag,
const double maxFlag )
inline

Definition at line 34 of file StatEntity.h.

35 {
36 reset( std::make_tuple(
37 std::make_tuple( std::make_tuple( std::make_tuple( entries, flag ), flag2 ), minFlag, maxFlag ),
38 std::make_tuple( 0, 0 ) ) );
39 }
double flag() const
Definition StatEntity.h:96
double flag2() const
Definition StatEntity.h:97

Member Function Documentation

◆ add()

unsigned long StatEntity::add ( const double v)
inline

Definition at line 80 of file StatEntity.h.

80 {
81 *this += v;
82 return nEntries();
83 }

◆ addFlag()

unsigned long StatEntity::addFlag ( const double v)
inline

Definition at line 84 of file StatEntity.h.

84{ return add( v ); }
unsigned long add(const double v)
Definition StatEntity.h:80

◆ Eff()

double StatEntity::Eff ( ) const
inline

Definition at line 92 of file StatEntity.h.

92{ return eff(); } // get efficiency

◆ effCounter()

static bool StatEntity::effCounter ( std::string_view name)
inlinestatic

Definition at line 103 of file StatEntity.h.

103 {
104 using boost::algorithm::icontains;
105 return icontains( name, "eff" ) || icontains( name, "acc" ) || icontains( name, "filt" ) ||
106 icontains( name, "fltr" ) || icontains( name, "pass" );
107 }

◆ essentiallyEqual()

static constexpr bool StatEntity::essentiallyEqual ( double const a,
double const b )
inlinestaticconstexprprivate

Definition at line 197 of file StatEntity.h.

197 {
198 return std::abs( a - b ) <= std::max( std::abs( a ), std::abs( b ) ) * std::numeric_limits<double>::epsilon();
199 }
Gaudi::ParticleID abs(const Gaudi::ParticleID &p)
Return the absolute value for a PID.
Definition ParticleID.h:191

◆ fillStream() [1/2]

MsgStream & StatEntity::fillStream ( MsgStream & o) const
inline

Definition at line 186 of file StatEntity.h.

186{ return print( o ); }
std::ostream & print(std::ostream &o, bool tableFormat, std::string_view name, bool flag=true, std::string_view fmtHead="%|-48.48s|%|27t|") const
Definition StatEntity.h:160

◆ fillStream() [2/2]

std::ostream & StatEntity::fillStream ( std::ostream & o) const
inline

Definition at line 185 of file StatEntity.h.

185{ return print( o ); }

◆ flag()

double StatEntity::flag ( ) const
inline

Definition at line 96 of file StatEntity.h.

96{ return sum(); }

◆ flag2()

double StatEntity::flag2 ( ) const
inline

Definition at line 97 of file StatEntity.h.

97{ return sum2(); }

◆ flagMax()

double StatEntity::flagMax ( ) const
inline

Definition at line 102 of file StatEntity.h.

102{ return max(); }

◆ flagMean()

double StatEntity::flagMean ( ) const
inline

Definition at line 98 of file StatEntity.h.

98{ return mean(); }

◆ flagMeanErr()

double StatEntity::flagMeanErr ( ) const
inline

◆ flagMin()

double StatEntity::flagMin ( ) const
inline

Definition at line 101 of file StatEntity.h.

101{ return min(); }

◆ flagRMS()

double StatEntity::flagRMS ( ) const
inline

◆ fromJSON()

static StatEntity StatEntity::fromJSON ( const nlohmann::json & j)
inlinestatic

Definition at line 189 of file StatEntity.h.

189 {
190 StatEntity res;
192 j, { { { { "nEntries", "sum" }, "sum2" }, "min", "max" }, { "nTrueEntries", "nFalseEntries" } } ) );
193 return res;
194 }
friend void reset(StatEntity &s)
Definition StatEntity.h:40
StatEntity()=default
the constructor with automatic registration in the owner's counter map

◆ Max()

double StatEntity::Max ( ) const
inline

Definition at line 94 of file StatEntity.h.

94{ return max(); } // get maximal value

◆ Mean()

double StatEntity::Mean ( ) const
inline

Definition at line 87 of file StatEntity.h.

87{ return mean(); } // get mean

◆ MeanErr()

double StatEntity::MeanErr ( ) const
inline

Definition at line 88 of file StatEntity.h.

88{ return meanErr(); } // get error in mean

◆ Min()

double StatEntity::Min ( ) const
inline

Definition at line 93 of file StatEntity.h.

93{ return min(); } // get minimal value

◆ operator++() [1/2]

StatEntity & StatEntity::operator++ ( )
inline

Definition at line 49 of file StatEntity.h.

49 {
50 ( *this ) += 1.0;
51 return *this;
52 }

◆ operator++() [2/2]

StatEntity StatEntity::operator++ ( int )
inline

Definition at line 53 of file StatEntity.h.

53 {
54 auto copy = *this;
55 ++( *this );
56 return copy;
57 }

◆ operator+=() [1/2]

StatEntity & StatEntity::operator+= ( double by)
inline

Definition at line 72 of file StatEntity.h.

72 {
73 this->AccumulatorSet::operator+=( by );
74 return *this;
75 }

◆ operator+=() [2/2]

StatEntity & StatEntity::operator+= ( StatEntity by)
inline

Definition at line 76 of file StatEntity.h.

76 {
77 mergeAndReset( by );
78 return *this;
79 }

◆ operator--() [1/2]

StatEntity & StatEntity::operator-- ( )
inline

Definition at line 58 of file StatEntity.h.

58 {
59 ( *this ) += -1.0;
60 return *this;
61 }

◆ operator--() [2/2]

StatEntity StatEntity::operator-- ( int )
inline

Definition at line 62 of file StatEntity.h.

62 {
63 auto copy = *this;
64 --( *this );
65 return copy;
66 }

◆ operator-=()

StatEntity & StatEntity::operator-= ( double by)
inline

Definition at line 45 of file StatEntity.h.

45 {
46 ( *this ) += ( -by );
47 return *this;
48 }

◆ operator<()

bool StatEntity::operator< ( const StatEntity & se) const
inline

Definition at line 67 of file StatEntity.h.

67 {
68 return std::make_tuple( nEntries(), sum(), min(), max(), sum2() ) <
69 std::make_tuple( se.nEntries(), se.sum(), se.min(), se.max(), se.sum2() );
70 }

◆ operator=()

void StatEntity::operator= ( double by)
inline

Definition at line 41 of file StatEntity.h.

41 {
42 this->reset();
43 ( *this ) += by;
44 }

◆ print() [1/6]

MsgStream & StatEntity::print ( MsgStream & o,
bool tableFormat,
std::string_view name,
bool flag = true,
std::string_view fmtHead = "%|-48.48s|%|27t|" ) const
inline

Definition at line 164 of file StatEntity.h.

165 {
166 return printImpl( o, tableFormat, name, flag, fmtHead );
167 }
stream & printImpl(stream &o, bool tableFormat, std::string_view name, bool flag, std::string_view fmtHead) const
Definition StatEntity.h:120

◆ print() [2/6]

MsgStream & StatEntity::print ( MsgStream & o,
bool tableFormat = false ) const
inlineoverridevirtual

Implements Gaudi::Accumulators::PrintableCounter.

Definition at line 176 of file StatEntity.h.

176 {
177 std::string emptyName;
178 return print( o, tableFormat, emptyName, true );
179 }

◆ print() [3/6]

virtual MsgStream & StatEntity::print ( MsgStream & o,
std::string_view tag ) const
inlineoverridevirtual

Reimplemented from Gaudi::Accumulators::PrintableCounter.

Definition at line 171 of file StatEntity.h.

171{ return print( o, true, tag, true ); }

◆ print() [4/6]

std::ostream & StatEntity::print ( std::ostream & o,
bool tableFormat,
std::string_view name,
bool flag = true,
std::string_view fmtHead = "%|-48.48s|%|27t|" ) const
inline

Definition at line 160 of file StatEntity.h.

161 {
162 return printImpl( o, tableFormat, name, flag, fmtHead );
163 }

◆ print() [5/6]

std::ostream & StatEntity::print ( std::ostream & ,
bool tableFormat = false ) const
inlineoverridevirtual

prints the counter to a stream

Implements Gaudi::Accumulators::PrintableCounter.

Definition at line 172 of file StatEntity.h.

172 {
173 std::string emptyName;
174 return print( o, tableFormat, emptyName, true );
175 }

◆ print() [6/6]

virtual std::ostream & StatEntity::print ( std::ostream & o,
std::string_view tag ) const
inlineoverridevirtual

prints the counter to a stream in table format, with the given tag

Reimplemented from Gaudi::Accumulators::PrintableCounter.

Definition at line 168 of file StatEntity.h.

168 {
169 return print( o, true, tag, true );
170 }

◆ printFormatted() [1/2]

MsgStream & StatEntity::printFormatted ( MsgStream & o,
const std::string & format ) const
inline

Definition at line 117 of file StatEntity.h.

117{ return printFormattedImpl( o, format ); }
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition MsgStream.cpp:93
stream & printFormattedImpl(stream &o, const std::string &format) const
Definition StatEntity.h:109

◆ printFormatted() [2/2]

std::ostream & StatEntity::printFormatted ( std::ostream & o,
const std::string & format ) const
inline

Definition at line 114 of file StatEntity.h.

114 {
115 return printFormattedImpl( o, format );
116 }

◆ printFormattedImpl()

template<typename stream>
stream & StatEntity::printFormattedImpl ( stream & o,
const std::string & format ) const
inline

Definition at line 109 of file StatEntity.h.

109 {
110 boost::format fmt{ format };
111 fmt % nEntries() % sum() % mean() % standard_deviation() % min() % max();
112 return o << fmt.str();
113 }

◆ printImpl()

template<typename stream>
stream & StatEntity::printImpl ( stream & o,
bool tableFormat,
std::string_view name,
bool flag,
std::string_view fmtHead ) const
inline

Definition at line 120 of file StatEntity.h.

120 {
121 if ( flag && effCounter( name ) && 0 <= eff() && 0 <= effErr() && sum() <= nEntries() &&
122 ( essentiallyEqual( min(), 0 ) || essentiallyEqual( min(), 1 ) ) &&
123 ( essentiallyEqual( max(), 0 ) || essentiallyEqual( max(), 1 ) ) ) {
124 // efficiency printing
125 if ( tableFormat ) {
126 if ( name.empty() ) {
127 constexpr auto fmt = "|%|10d| |%|11.5g| |(%|#9.7g| +- %|-#8.7g|)%%| ------- | ------- |";
128 return o << boost::format{ fmt } % BinomialAccParent::nEntries() % sum() % ( efficiency() * 100 ) %
129 ( efficiencyErr() * 100 );
130 } else {
131 auto fmt = std::string{ " |*" }.append( fmtHead ).append(
132 "|%|10d| |%|11.5g| |(%|#9.7g| +- %|-#8.7g|)%%| ------- | ------- |" );
133 return o << boost::format{ fmt } % ( std::string{ "\"" }.append( name ).append( "\"" ) ) %
134 BinomialAccParent::nEntries() % sum() % ( efficiency() * 100 ) % ( efficiencyErr() * 100 );
135 }
136 } else {
137 constexpr auto fmt = "#=%|-7lu| Sum=%|-11.5g| Eff=|(%|#9.7g| +- %|-#8.6g|)%%|";
138 return o << boost::format{ fmt } % BinomialAccParent::nEntries() % sum() % ( efficiency() * 100 ) %
139 ( efficiencyErr() * 100 );
140 }
141 } else {
142 // Standard printing
143 if ( tableFormat ) {
144 if ( name.empty() ) {
145 constexpr auto fmt = "|%|10d| |%|11.7g| |%|#11.5g| |%|#11.5g| |%|#12.5g| |%|#12.5g| |";
146 return o << boost::format{ fmt } % nEntries() % sum() % mean() % standard_deviation() % min() % max();
147
148 } else {
149 auto fmt = std::string{ " | " }.append( fmtHead ).append(
150 "|%|10d| |%|11.7g| |%|#11.5g| |%|#11.5g| |%|#12.5g| |%|#12.5g| |" );
151 return o << boost::format{ fmt } % std::string{ "\"" }.append( name ).append( "\"" ) % nEntries() % sum() %
152 mean() % standard_deviation() % min() % max();
153 }
154 } else {
155 constexpr auto fmt = "#=%|-7lu| Sum=%|-11.5g| Mean=%|#10.4g| +- %|-#10.5g| Min/Max=%|#10.4g|/%|-#10.4g|";
156 return o << boost::format{ fmt } % nEntries() % sum() % mean() % standard_deviation() % min() % max();
157 }
158 }
159 }
static bool effCounter(std::string_view name)
Definition StatEntity.h:103
static constexpr bool essentiallyEqual(double const a, double const b)
Definition StatEntity.h:197

◆ reset() [1/2]

void Gaudi::Accumulators::AccumulatorSet< double, Atomicity, double, Gaudi::Accumulators::StatAccumulator >::reset ( )
inline

Definition at line 534 of file Accumulators.h.

534{ ( Bases<Atomicity, Arithmetic>::reset(), ... ); }

◆ reset() [2/2]

void Gaudi::Accumulators::AccumulatorSet< double, Atomicity, double, Gaudi::Accumulators::StatAccumulator >::reset ( const InternalType & t)
inline

Definition at line 546 of file Accumulators.h.

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

◆ RMS()

double StatEntity::RMS ( ) const
inline

Definition at line 91 of file StatEntity.h.

91{ return standard_deviation(); } // get rms

◆ Rms()

double StatEntity::Rms ( ) const
inline

Definition at line 90 of file StatEntity.h.

90{ return standard_deviation(); } // get rms

◆ rms()

double StatEntity::rms ( ) const
inline

Definition at line 89 of file StatEntity.h.

89{ return standard_deviation(); } // get rms

◆ Sum()

double StatEntity::Sum ( ) const
inline

Definition at line 86 of file StatEntity.h.

86{ return sum(); } // get sum

◆ toString()

std::string StatEntity::toString ( ) const
inline

Definition at line 180 of file StatEntity.h.

180 {
181 std::ostringstream ost;
182 print( ost );
183 return ost.str();
184 }

Friends And Related Symbol Documentation

◆ reset

void reset ( StatEntity & s)
friend

Definition at line 40 of file StatEntity.h.

40{ s.reset(); }

◆ to_json

void to_json ( nlohmann::json & j,
StatEntity const & s )
friend

Basic JSON export for Gaudi::Monitoring::Hub support.

Definition at line 14 of file StatEntity.cpp.

14 {
15 j = { { "type", s.typeString },
16 { "empty", s.nEntries() == 0 },
17 { "nEntries", s.nEntries() },
18 { "sum", s.sum() },
19 { "mean", s.mean() },
20 { "sum2", s.sum2() },
21 { "standard_deviation", s.standard_deviation() },
22 { "min", s.min() },
23 { "max", s.max() },
24 { "nTrueEntries", s.nTrueEntries() },
25 { "nFalseEntries", s.nFalseEntries() },
26 { "efficiency", s.efficiency() },
27 { "efficiencyErr", s.efficiencyErr() } };
28}

Member Data Documentation

◆ typeString

const std::string StatEntity::typeString { "statentity" }
inlinestatic

Definition at line 25 of file StatEntity.h.

25{ "statentity" };

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