5 #ifndef GAUDIKERNEL_STATENTITY_H
6 #define GAUDIKERNEL_STATENTITY_H 1
17 #include "GaudiKernel/Kernel.h"
88 const double minFlag ,
89 const double maxFlag ) ;
96 const unsigned long& nEntries ()
const {
return m_se_nEntries ; }
98 const double&
sum ()
const {
return m_se_accumulatedFlag ; }
100 const double& sum2 ()
const {
return m_se_accumulatedFlag2 ; }
102 double mean ()
const ;
104 double rms ()
const ;
106 double meanErr ()
const ;
108 const double&
min ()
const {
return m_se_minimalFlag ; }
110 const double& max ()
const {
return m_se_maximalFlag ; }
146 double efficiency ()
const ;
183 double efficiencyErr ()
const ;
185 double eff ()
const {
return efficiency () ; }
187 double effErr ()
const {
return efficiencyErr () ; }
232 StatEntity& operator++ () {
return (*
this)+= 1 ; }
251 StatEntity& operator++ (
int) {
return ++(*this) ; }
293 StatEntity& operator-- () {
return (*
this)-=1 ; }
311 StatEntity& operator-- (
int) {
return --(*this) ; }
361 unsigned long add (
const double Flag ) ;
365 void setnEntriesBeforeReset (
unsigned long nEntriesBeforeReset );
371 std::ostream& print ( std::ostream& o = std::cout )
const ;
375 std::ostream& fillStream ( std::ostream& o )
const {
return print ( o ) ; }
380 inline double Sum ()
const {
return sum () ; }
382 inline double Mean ()
const {
return mean () ; }
384 inline double MeanErr ()
const {
return meanErr () ; }
386 inline double Rms ()
const {
return rms () ; }
388 inline double RMS ()
const {
return rms () ; }
390 inline double Eff ()
const {
return eff () ; }
392 inline double Min ()
const {
return min () ; }
394 inline double Max ()
const {
return max () ; }
399 inline double flag ()
const {
return sum () ; }
401 inline double flag2 ()
const {
return sum2 () ; }
403 inline double flagMean ()
const {
return mean () ; }
405 inline double flagRMS ()
const {
return rms () ; }
407 inline double flagMeanErr ()
const {
return meanErr () ; }
409 inline double flagMin ()
const {
return min () ; }
411 inline double flagMax ()
const {
return max () ; }
416 inline unsigned long addFlag (
const double Flag ) {
return add ( Flag ) ; }
426 static const std::string&
format () ;
438 unsigned long m_se_nEntries ;
440 double m_se_accumulatedFlag ;
441 double m_se_accumulatedFlag2 ;
442 double m_se_minimalFlag ;
443 double m_se_maximalFlag ;
445 long m_se_nEntriesBeforeReset ;
518 const std::string& format1 =
519 " |%|7d| |%|11.7g| |%|#11.5g| |%|#10.5g| |%|#10.5g| |%|#10.5g| |" ,
520 const std::string& format2 =
521 "*|%|7d| |%|11.5g| |(%|#9.7g| +- %|-#8.6g|)%%| ----- | ----- |" );
584 (
const std::string& name ,
586 const bool flag =
true ,
587 const std::string& format1 =
588 " %|-15.15s|%|17t||%|7d| |%|11.7g| |%|#11.5g| |%|#10.5g| |%|#10.5g| |%|#10.5g| |" ,
589 const std::string& format2 =
590 "*%|-15.15s|%|17t||%|7d| |%|11.5g| |(%|#9.7g| +- %|-#8.6g|)%%| ----- | ----- |" );
660 (
const std::string& name ,
661 const std::string& group ,
663 const bool flag =
true ,
664 const std::string& format1 =
665 " %|15.15s|%|-15.15s|%|32t||%|7d| |%|11.7g| |%|#11.5g| |%|#10.5g| |%|#10.5g| |%|#10.5g| |" ,
666 const std::string& format2 =
667 "*%|15.15s|%|-15.15s|%|32t||%|7d| |%|11.5g| |(%|#9.7g| +- %|-#8.6g|)%%| ----- | ----- |" ) ;
675 #endif // GAUDIKERNEL_STATENTITY_H
double sum(double x, double y, double z)
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
GAUDI_API StatEntity operator+(const StatEntity &entity, const double value)
external operator for addition of StatEntity and a number
GAUDI_API StatEntity operator-(const StatEntity &entity, const double value)
external operator for subtraction of StatEntity and a number
GAUDI_API std::ostream & operator<<(std::ostream &stream, const StatEntity &entity)
external printout operator to std::ostream
GAUDI_API std::string formatAsTableRow(const StatEntity &counter, const bool flag, const std::string &format1=" |%|7d| |%|11.7g| |%|#11.5g| |%|#10.5g| |%|#10.5g| |%|#10.5g| |", const std::string &format2="*|%|7d| |%|11.5g| |(%|#9.7g| +- %|-#8.6g|)%%| ----- | ----- |")
print the counter in a form of the table row
bool operator<(const Gaudi::Time &t1, const Gaudi::Time &t2)
The basic counter used for Monitoring purposes.
Helper functions to set/get the application return code.
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".