1 #ifndef GAUDIKERNEL_STATENTITY_H 2 #define GAUDIKERNEL_STATENTITY_H 1 82 StatEntity(
const unsigned long entries,
const double flag,
const double flag2,
const double minFlag,
83 const double maxFlag );
92 const unsigned long&
nEntries()
const {
return m_se.nEntries; }
94 const double&
sum()
const {
return m_se.accumulatedFlag; }
96 const double&
sum2()
const {
return m_se.accumulatedFlag2; }
98 double mean()
const {
return m_se.mean(); }
100 double rms()
const {
return m_se.rms(); }
102 double meanErr()
const {
return m_se.meanErr(); }
104 const double&
min()
const {
return m_se.minimalFlag; }
106 const double&
max()
const {
return m_se.maximalFlag; }
181 double eff()
const {
return efficiency(); }
183 double effErr()
const {
return efficiencyErr(); }
331 return ( ( *
this ) += f );
358 unsigned long add(
const double Flag );
362 void setnEntriesBeforeReset(
unsigned long nEntriesBeforeReset );
377 inline double Sum()
const {
return sum(); }
383 inline double Rms()
const {
return rms(); }
385 inline double RMS()
const {
return rms(); }
387 inline double Eff()
const {
return eff(); }
389 inline double Min()
const {
return min(); }
391 inline double Max()
const {
return max(); }
398 inline double flag2()
const {
return sum2(); }
406 inline double flagMin()
const {
return min(); }
408 inline double flagMax()
const {
return max(); }
413 inline unsigned long addFlag(
const double Flag ) {
return add( Flag ); }
450 double accumulatedFlag = 0;
451 double accumulatedFlag2 = 0;
455 long nEntriesBeforeReset = -1;
467 unsigned long add(
double Flag );
471 double efficiency()
const;
472 double efficiencyErr()
const;
476 auto order = [](
const auto&
s ) {
477 return std::tie(
s.nEntries,
s.accumulatedFlag,
s.minimalFlag,
s.maximalFlag,
s.accumulatedFlag2 );
479 return order( lhs ) < order( rhs );
543 const std::string& format1 =
" |%|7d| |%|11.7g| |%|#11.5g| |%|#10.5g| |%|#10.5g| |%|#10.5g| |",
544 const std::string& format2 =
"*|%|7d| |%|11.5g| |(%|#9.7g| +- %|-#8.6g|)%%| ----- | ----- |" );
608 const std::string& format1 =
" %|-15.15s|%|17t||%|7d| |%|11.7g| |%|#11.5g| |%|#10.5g| |%|#10.5g| |%|#10.5g| |",
610 "*%|-15.15s|%|17t||%|7d| |%|11.5g| |(%|#9.7g| +- %|-#8.6g|)%%| ----- | ----- |" );
682 " %|15.15s|%|-15.15s|%|32t||%|7d| |%|11.7g| |%|#11.5g| |%|#10.5g| |%|#10.5g| |%|#10.5g| |",
684 "*%|15.15s|%|-15.15s|%|32t||%|7d| |%|11.5g| |(%|#9.7g| +- %|-#8.6g|)%%| ----- | ----- |" );
692 #endif // GAUDIKERNEL_STATENTITY_H double effErr() const
shortcut,
const double & max() const
maximal value
double Min() const
get minimal value
const unsigned long & nEntries() const
getters – no synchronization!
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
double Mean() const
get mean
StatEntity & operator=(const double f)
Assignment from the flag The action: reset and the general increment Such case could be useful for st...
double flagRMS() const
r.m.s of flag
std::ostream & fillStream(std::ostream &o) const
printout to std::ostream
double efficiency() const
Interpret the counter as some measure of efficiency The efficiency is calculated as the ratio of the ...
double sum(double x, double y, double z)
double flagMin() const
minimal flag
double accumulatedFlag
accumulated flag
double meanErr() const
error in mean value of counter
se & operator+=(const struct se &other)
double flagMeanErr() const
error in mean value of flag
StatEntity & operator++(int)
Post-increment operator for the flag.
double Max() const
get maximal value
const double & sum2() const
accumulated value**2
double flagMax() const
maximal flag
GAUDI_API std::string formatAsTableRow(const std::string &name, const std::string &group, const StatEntity &entity, const bool flag=true, const std::string &format1=" %|15.15s|%|-15.15s|%|32t||%|7d| |%|11.7g| |%|#11.5g| |%|#10.5g| |%|#10.5g| |%|#10.5g| |", const std::string &format2="*%|15.15s|%|-15.15s|%|32t||%|7d| |%|11.5g| |(%|#9.7g| +- %|-#8.6g|)%%| ----- | ----- |")
print the counter in a form of the table row
PropertyMgr & operator=(const PropertyMgr &)=delete
const double & sum() const
accumulated value
double eff() const
shortcut,
StatEntity & operator++()
Pre-increment operator for the flag Could be used for easy manipulation with StatEntity object: ...
double mean() const
mean value of counter
double MeanErr() const
get error in mean
double flagMean() const
mean value of flag
double Eff() const
get efficiency
const double & min() const
minimal value
double Sum() const
get sum
unsigned long addFlag(const double Flag)
add a flag
StatEntity & operator+=(const double f)
General increment operator for the flag Could be used for easy manipulation with StatEntity object: ...
bool operator<(const EventIDBase &lhs, const EventIDBase &rhs)
StatEntity & operator--()
Pre-decrement operator for the flag Could be used for easy manipulation with StatEntity object: ...
StatEntity & operator--(int)
Post-decrement operator for the flag Could be used for easy manipulation with StatEntity object: ...
double Rms() const
get rms
GAUDI_API Stat operator-(const Stat &stat, const double value)
external operator for subtraction of Stat and a number
double RMS() const
get rms
double rms() const
r.m.s of value
The basic counter used for Monitoring purposes.
double flag2() const
accumulated "flag squared"
friend bool operator<(const struct se &lhs, const struct se &rhs)
StatEntity & operator-=(const double f)
General decrement operator for the flag Could be used for easy manipulation with StatEntity object: ...
Helper functions to set/get the application return code.
std::string toString(const Type &)
double flag() const
accumulated "flag"
unsigned long nEntries
number of calls
decltype(std::declval< TP >()+std::declval< T >()) operator+(const T &v, const Property< TP, V, H > &p)
implemantation of (value + property)
double efficiencyErr() const
Interpret the counter as some measure of efficiency and evaluate the uncertainty of this efficiency u...
std::ostream & operator<<(std::ostream &str, const GaudiAlg::ID &id)
Operator overloading for ostream.