The Gaudi Framework
v29r0 (ff2e7097)
|
The basic counter used for Monitoring purposes. More...
#include <GaudiKernel/StatEntity.h>
Classes | |
struct | se |
Public Member Functions | |
StatEntity ()=default | |
the default constructor More... | |
StatEntity (const unsigned long entries, const double flag, const double flag2, const double minFlag, const double maxFlag) | |
StatEntity (const StatEntity &) | |
copy constructor More... | |
StatEntity & | operator= (const StatEntity &) |
assignment operator More... | |
const unsigned long & | nEntries () const |
getters – no synchronization! More... | |
const double & | sum () const |
accumulated value More... | |
const double & | sum2 () const |
accumulated value**2 More... | |
double | mean () const |
mean value of counter More... | |
double | rms () const |
r.m.s of value More... | |
double | meanErr () const |
error in mean value of counter More... | |
const double & | min () const |
minimal value More... | |
const double & | max () const |
maximal value More... | |
double | efficiency () const |
Interpret the counter as some measure of efficiency The efficiency is calculated as the ratio of the weight over the number of entries One gets the correct interpretation in the case of filling the counters only with 0 and 1. More... | |
double | efficiencyErr () const |
Interpret the counter as some measure of efficiency and evaluate the uncertainty of this efficiency using binomial estimate. More... | |
double | eff () const |
shortcut, More... | |
double | effErr () const |
shortcut, More... | |
StatEntity & | operator+= (const double f) |
General increment operator for the flag Could be used for easy manipulation with StatEntity object: More... | |
StatEntity & | operator++ () |
Pre-increment operator for the flag Could be used for easy manipulation with StatEntity object: More... | |
StatEntity & | operator++ (int) |
Post-increment operator for the flag. More... | |
StatEntity & | operator-= (const double f) |
General decrement operator for the flag Could be used for easy manipulation with StatEntity object: More... | |
StatEntity & | operator-- () |
Pre-decrement operator for the flag Could be used for easy manipulation with StatEntity object: More... | |
StatEntity & | operator-- (int) |
Post-decrement operator for the flag Could be used for easy manipulation with StatEntity object: More... | |
StatEntity & | operator= (const double f) |
Assignment from the flag The action: reset and the general increment Such case could be useful for statistical monitoring. More... | |
StatEntity & | operator+= (const StatEntity &other) |
increment with other counter (useful for Monitoring/Adder ) More... | |
unsigned long | add (const double Flag) |
add a value More... | |
void | reset () |
reset the counters More... | |
void | setnEntriesBeforeReset (unsigned long nEntriesBeforeReset) |
DR specify number of entry before reset. More... | |
std::string | toString () const |
representation as string More... | |
std::ostream & | print (std::ostream &o=std::cout) const |
printout to std::ostream More... | |
std::ostream & | fillStream (std::ostream &o) const |
printout to std::ostream More... | |
double | Sum () const |
get sum More... | |
double | Mean () const |
get mean More... | |
double | MeanErr () const |
get error in mean More... | |
double | Rms () const |
get rms More... | |
double | RMS () const |
get rms More... | |
double | Eff () const |
get efficiency More... | |
double | Min () const |
get minimal value More... | |
double | Max () const |
get maximal value More... | |
double | flag () const |
accumulated "flag" More... | |
double | flag2 () const |
accumulated "flag squared" More... | |
double | flagMean () const |
mean value of flag More... | |
double | flagRMS () const |
r.m.s of flag More... | |
double | flagMeanErr () const |
error in mean value of flag More... | |
double | flagMin () const |
minimal flag More... | |
double | flagMax () const |
maximal flag More... | |
unsigned long | addFlag (const double Flag) |
add a flag More... | |
Static Public Member Functions | |
static const std::string & | format () |
the internal format description More... | |
static int | size () |
the actual size of published data More... | |
Private Attributes | |
struct StatEntity::se | m_se = {} |
std::mutex | m_mutex |
Friends | |
GAUDI_API friend bool | operator< (const StatEntity &lhs, const StatEntity &rhs) |
comparison More... | |
GAUDI_API friend StatEntity | operator+ (const StatEntity &entity, const double value) |
external operator for addition of StatEntity and a number More... | |
GAUDI_API friend StatEntity | operator+ (const double value, const StatEntity &entity) |
external operator for addition of StatEntity and a number More... | |
GAUDI_API friend StatEntity | operator+ (const StatEntity &entity, const StatEntity &value) |
external operator for addition of StatEntity and a number More... | |
GAUDI_API friend StatEntity | operator- (const StatEntity &entity, const double value) |
external operator for subtraction of StatEntity and a number More... | |
GAUDI_API friend std::ostream & | operator<< (std::ostream &stream, const StatEntity &entity) |
external printout operator to std::ostream More... | |
The basic counter used for Monitoring purposes.
It is used as a small helper class for implementation of class ChronoStatSvc but it also could be used in stand-alone mode to perform trivial statistical evaluations. e.g.
Essentially the generic counter could be considered as the trivial 1-bin
Definition at line 65 of file StatEntity.h.
|
default |
the default constructor
StatEntity::StatEntity | ( | const unsigned long | entries, |
const double | flag, | ||
const double | flag2, | ||
const double | minFlag, | ||
const double | maxFlag | ||
) |
Definition at line 42 of file StatEntity.cpp.
StatEntity::StatEntity | ( | const StatEntity & | other | ) |
unsigned long StatEntity::add | ( | const double | Flag | ) |
add a value
Flag | value to be added |
Definition at line 199 of file StatEntity.cpp.
|
inline |
add a flag
Flag | value to be added |
Definition at line 413 of file StatEntity.h.
|
inline |
shortcut,
Definition at line 181 of file StatEntity.h.
|
inline |
|
inline |
shortcut,
Definition at line 183 of file StatEntity.h.
|
inline |
Interpret the counter as some measure of efficiency The efficiency is calculated as the ratio of the weight over the number of entries One gets the correct interpretation in the case of filling the counters only with 0 and 1.
Some checks are performed:
If these conditions are not satisfied the method returns -1, otherwise it returns the value of "flagMean"
Definition at line 142 of file StatEntity.h.
|
inline |
Interpret the counter as some measure of efficiency and evaluate the uncertainty of this efficiency using binomial estimate.
The efficiency is calculated as the ratio of the weight over the number of entries One gets the correct interpretation in the case of filling the counters only with 0 and 1. Some checks are performed:
If these conditions are not satisfied the method returns -1.
Definition at line 179 of file StatEntity.h.
|
inline |
printout to std::ostream
s | the reference to the output stream |
Definition at line 372 of file StatEntity.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
error in mean value of flag
Definition at line 404 of file StatEntity.h.
|
inline |
|
inline |
|
static |
the internal format description
< check for "D"
Definition at line 62 of file StatEntity.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
error in mean value of counter
Definition at line 102 of file StatEntity.h.
|
inline |
get error in mean
Definition at line 381 of file StatEntity.h.
|
inline |
|
inline |
|
inline |
getters – no synchronization!
Definition at line 92 of file StatEntity.h.
|
inline |
Pre-increment operator for the flag Could be used for easy manipulation with StatEntity object:
Definition at line 229 of file StatEntity.h.
|
inline |
Post-increment operator for the flag.
Actually it is the same as pre-increment. Could be used for easy manipulation with StatEntity object:
Definition at line 248 of file StatEntity.h.
|
inline |
General increment operator for the flag Could be used for easy manipulation with StatEntity object:
f | counter increment |
Definition at line 207 of file StatEntity.h.
StatEntity & StatEntity::operator+= | ( | const StatEntity & | other | ) |
increment with other counter (useful for Monitoring/Adder )
other | counter to be added |
Definition at line 190 of file StatEntity.cpp.
|
inline |
Pre-decrement operator for the flag Could be used for easy manipulation with StatEntity object:
Definition at line 290 of file StatEntity.h.
|
inline |
Post-decrement operator for the flag Could be used for easy manipulation with StatEntity object:
Definition at line 308 of file StatEntity.h.
|
inline |
General decrement operator for the flag Could be used for easy manipulation with StatEntity object:
f | counter increment |
Definition at line 268 of file StatEntity.h.
StatEntity & StatEntity::operator= | ( | const StatEntity & | other | ) |
|
inline |
Assignment from the flag The action: reset and the general increment Such case could be useful for statistical monitoring.
f | new value of the counter |
< reset the statistics
< use the regular increment
Definition at line 326 of file StatEntity.h.
std::ostream & StatEntity::print | ( | std::ostream & | o = std::cout | ) | const |
printout to std::ostream
s | the reference to the output stream |
Definition at line 232 of file StatEntity.cpp.
void StatEntity::reset | ( | ) |
|
inline |
|
inline |
|
inline |
void StatEntity::setnEntriesBeforeReset | ( | unsigned long | nEntriesBeforeReset | ) |
DR specify number of entry before reset.
Definition at line 215 of file StatEntity.cpp.
|
static |
the actual size of published data
Definition at line 75 of file StatEntity.cpp.
|
inline |
|
inline |
|
inline |
std::string StatEntity::toString | ( | ) | const |
representation as string
Definition at line 223 of file StatEntity.cpp.
|
friend |
external operator for addition of StatEntity and a number
Definition at line 247 of file StatEntity.cpp.
|
friend |
external operator for addition of StatEntity and a number
Definition at line 255 of file StatEntity.cpp.
|
friend |
external operator for addition of StatEntity and a number
Definition at line 267 of file StatEntity.cpp.
|
friend |
external operator for subtraction of StatEntity and a number
Definition at line 259 of file StatEntity.cpp.
|
friend |
|
friend |
external printout operator to std::ostream
Definition at line 275 of file StatEntity.cpp.
|
private |
Definition at line 483 of file StatEntity.h.
|
private |