![]() |
The Gaudi Framework
v28r2
|
The basic counter used for Monitoring purposes. More...
#include <GaudiKernel/StatEntity.h>
Public Member Functions | |
StatEntity () | |
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... | |
~StatEntity ()=default | |
destructor More... | |
const unsigned long & | nEntries () const |
getters 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... | |
bool | operator< (const StatEntity &se) const |
comparison 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 | |
unsigned long | m_se_nEntries |
number of calls More... | |
double | m_se_accumulatedFlag |
accumulated flag More... | |
double | m_se_accumulatedFlag2 |
double | m_se_minimalFlag |
double | m_se_maximalFlag |
long | m_se_nEntriesBeforeReset |
std::mutex | m_mutex |
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.
|
inline |
StatEntity::StatEntity | ( | const unsigned long | entries, |
const double | flag, | ||
const double | flag2, | ||
const double | minFlag, | ||
const double | maxFlag | ||
) |
Definition at line 45 of file StatEntity.cpp.
StatEntity::StatEntity | ( | const StatEntity & | other | ) |
copy constructor
Definition at line 61 of file StatEntity.cpp.
|
default |
destructor
unsigned long StatEntity::add | ( | const double | Flag | ) |
add a value
Flag | value to be added |
accumulate the flag
evaluate min/max
Definition at line 211 of file StatEntity.cpp.
|
inline |
add a flag
Flag | value to be added |
Definition at line 417 of file StatEntity.h.
|
inline |
shortcut,
Definition at line 186 of file StatEntity.h.
|
inline |
|
inline |
shortcut,
Definition at line 188 of file StatEntity.h.
double StatEntity::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.
Some checks are performed:
If these conditions are not satisfied the method returns -1, otherwise it returns the value of "flagMean"
Definition at line 144 of file StatEntity.cpp.
double StatEntity::efficiencyErr | ( | ) | const |
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 156 of file StatEntity.cpp.
|
inline |
printout to std::ostream
s | the reference to the output stream |
Definition at line 376 of file StatEntity.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
error in mean value of flag
Definition at line 408 of file StatEntity.h.
|
inline |
|
inline |
|
static |
the internal format description
< check for "D"
Definition at line 84 of file StatEntity.cpp.
|
inline |
|
inline |
double StatEntity::mean | ( | ) | const |
mean value of counter
Definition at line 106 of file StatEntity.cpp.
|
inline |
double StatEntity::meanErr | ( | ) | const |
error in mean value of counter
Definition at line 129 of file StatEntity.cpp.
|
inline |
get error in mean
Definition at line 385 of file StatEntity.h.
|
inline |
|
inline |
|
inline |
|
inline |
Pre-increment operator for the flag Could be used for easy manipulation with StatEntity object:
Definition at line 233 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 252 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 211 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 173 of file StatEntity.cpp.
|
inline |
Pre-decrement operator for the flag Could be used for easy manipulation with StatEntity object:
Definition at line 294 of file StatEntity.h.
|
inline |
Post-decrement operator for the flag Could be used for easy manipulation with StatEntity object:
Definition at line 312 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 272 of file StatEntity.h.
bool StatEntity::operator< | ( | const StatEntity & | se | ) | const |
StatEntity & StatEntity::operator= | ( | const StatEntity & | other | ) |
assignment operator
Definition at line 73 of file StatEntity.cpp.
|
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 330 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 260 of file StatEntity.cpp.
void StatEntity::reset | ( | ) |
reset the counters
Definition at line 232 of file StatEntity.cpp.
double StatEntity::rms | ( | ) | const |
r.m.s of value
Definition at line 116 of file StatEntity.cpp.
|
inline |
|
inline |
void StatEntity::setnEntriesBeforeReset | ( | unsigned long | nEntriesBeforeReset | ) |
|
static |
the actual size of published data
Definition at line 98 of file StatEntity.cpp.
|
inline |
accumulated value
Definition at line 99 of file StatEntity.h.
|
inline |
|
inline |
std::string StatEntity::toString | ( | ) | const |
representation as string
Definition at line 251 of file StatEntity.cpp.
|
private |
Definition at line 448 of file StatEntity.h.
|
private |
accumulated flag
Definition at line 441 of file StatEntity.h.
|
private |
Definition at line 442 of file StatEntity.h.
|
private |
Definition at line 444 of file StatEntity.h.
|
private |
Definition at line 443 of file StatEntity.h.
|
private |
number of calls
Definition at line 439 of file StatEntity.h.
|
private |
Definition at line 446 of file StatEntity.h.