backward compatible StatEntity class.
More...
#include <GaudiKernel/StatEntity.h>
|
| using | AccParent = Gaudi::Accumulators::AccumulatorSet< double, Gaudi::Accumulators::atomicity::full, Gaudi::Accumulators::StatAccumulator, Gaudi::Accumulators::BinomialAccumulator > |
| |
| using | BinomialAccParent = Gaudi::Accumulators::BinomialAccumulator< double, Gaudi::Accumulators::atomicity::full > |
| |
|
| | StatEntity ()=default |
| | the constructor with automatic registration in the owner's counter map More...
|
| |
| template<class OWNER > |
| | StatEntity (OWNER *o, const std::string &tag) |
| |
| | StatEntity (const unsigned long entries, const double flag, const double flag2, const double minFlag, const double maxFlag) |
| |
| void | reset () |
| |
| void | operator= (double by) |
| |
| StatEntity & | operator-= (double by) |
| |
| StatEntity & | operator++ () |
| |
| StatEntity | operator++ (int) |
| |
| StatEntity & | operator-- () |
| |
| StatEntity | operator-- (int) |
| |
| bool | operator< (const StatEntity &se) const |
| |
| StatEntity & | operator+= (double by) |
| |
| StatEntity & | operator+= (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 |
| |
| MsgStream & | printFormatted (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 |
| |
| MsgStream & | print (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 |
| |
| virtual MsgStream & | print (MsgStream &o, std::string_view tag) const override |
| |
| std::ostream & | print (std::ostream &o, bool tableFormat=false) const override |
| |
| MsgStream & | print (MsgStream &o, bool tableFormat=false) const override |
| |
| std::string | toString () const |
| |
| std::ostream & | fillStream (std::ostream &o) const |
| |
| MsgStream & | fillStream (MsgStream &o) const |
| |
backward compatible StatEntity class.
Should not be used. Only here for backward compatibility
Definition at line 18 of file StatEntity.h.
◆ AccParent
| using StatEntity::AccParent = Gaudi::Accumulators::AccumulatorSet<double, Gaudi::Accumulators::atomicity::full, Gaudi::Accumulators::StatAccumulator, Gaudi::Accumulators::BinomialAccumulator> |
◆ BinomialAccParent
◆ StatEntity() [1/3]
| StatEntity::StatEntity |
( |
| ) |
|
|
default |
the constructor with automatic registration in the owner's counter map
◆ StatEntity() [2/3]
template<class OWNER >
| StatEntity::StatEntity |
( |
OWNER * |
o, |
|
|
const std::string & |
tag |
|
) |
| |
|
inline |
Definition at line 32 of file StatEntity.h.
33 o->declareCounter( tag, *
this );
◆ StatEntity() [3/3]
| StatEntity::StatEntity |
( |
const unsigned long |
entries, |
|
|
const double |
flag, |
|
|
const double |
flag2, |
|
|
const double |
minFlag, |
|
|
const double |
maxFlag |
|
) |
| |
|
inline |
◆ add()
| unsigned long StatEntity::add |
( |
const double |
v | ) |
|
|
inline |
◆ addFlag()
| unsigned long StatEntity::addFlag |
( |
const double |
v | ) |
|
|
inline |
Definition at line 85 of file StatEntity.h.
unsigned long add(const double v)
◆ Eff()
| double StatEntity::Eff |
( |
| ) |
const |
|
inline |
◆ effCounter()
| static bool StatEntity::effCounter |
( |
std::string_view |
name | ) |
|
|
inlinestatic |
Definition at line 104 of file StatEntity.h.
105 using boost::algorithm::icontains;
106 return icontains(
name,
"eff" ) || icontains(
name,
"acc" ) || icontains(
name,
"filt" ) ||
107 icontains(
name,
"fltr" ) || icontains(
name,
"pass" );
◆ fillStream() [1/2]
Definition at line 185 of file StatEntity.h.
185 {
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
◆ fillStream() [2/2]
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
◆ flag()
| double StatEntity::flag |
( |
| ) |
const |
|
inline |
◆ flag2()
| double StatEntity::flag2 |
( |
| ) |
const |
|
inline |
◆ flagMax()
| double StatEntity::flagMax |
( |
| ) |
const |
|
inline |
Definition at line 103 of file StatEntity.h.
EventIDBase max(const EventIDBase &lhs, const EventIDBase &rhs)
◆ flagMean()
| double StatEntity::flagMean |
( |
| ) |
const |
|
inline |
◆ flagMeanErr()
| double StatEntity::flagMeanErr |
( |
| ) |
const |
|
inline |
◆ flagMin()
| double StatEntity::flagMin |
( |
| ) |
const |
|
inline |
Definition at line 102 of file StatEntity.h.
EventIDBase min(const EventIDBase &lhs, const EventIDBase &rhs)
◆ flagRMS()
| double StatEntity::flagRMS |
( |
| ) |
const |
|
inline |
Definition at line 100 of file StatEntity.h.
100 {
return standard_deviation(); }
◆ Max()
| double StatEntity::Max |
( |
| ) |
const |
|
inline |
Definition at line 95 of file StatEntity.h.
EventIDBase max(const EventIDBase &lhs, const EventIDBase &rhs)
◆ Mean()
| double StatEntity::Mean |
( |
| ) |
const |
|
inline |
◆ MeanErr()
| double StatEntity::MeanErr |
( |
| ) |
const |
|
inline |
◆ Min()
| double StatEntity::Min |
( |
| ) |
const |
|
inline |
Definition at line 94 of file StatEntity.h.
EventIDBase min(const EventIDBase &lhs, const EventIDBase &rhs)
◆ operator++() [1/2]
◆ operator++() [2/2]
◆ operator+=() [1/2]
Definition at line 73 of file StatEntity.h.
74 this->AccumulatorSet::operator+=( by );
◆ operator+=() [2/2]
◆ operator--() [1/2]
◆ operator--() [2/2]
◆ operator-=()
◆ operator<()
| bool StatEntity::operator< |
( |
const StatEntity & |
se | ) |
const |
|
inline |
Definition at line 68 of file StatEntity.h.
70 std::make_tuple( se.nEntries(), se.sum(), se.min(), se.max(), se.sum2() );
EventIDBase min(const EventIDBase &lhs, const EventIDBase &rhs)
EventIDBase max(const EventIDBase &lhs, const EventIDBase &rhs)
◆ operator=()
| void StatEntity::operator= |
( |
double |
by | ) |
|
|
inline |
◆ print() [1/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.
stream & printImpl(stream &o, bool tableFormat, std::string_view name, bool flag, std::string_view fmtHead) const
◆ print() [2/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.
stream & printImpl(stream &o, bool tableFormat, std::string_view name, bool flag, std::string_view fmtHead) const
◆ print() [3/6]
Definition at line 168 of file StatEntity.h.
169 return print( o,
true, tag,
true );
std::ostream & print(std::ostream &o, bool tableFormat, std::string_view name, bool flag=true, std::string_view fmtHead="%|-48.48s|%|27t|") const
◆ print() [4/6]
Definition at line 171 of file StatEntity.h.
171 {
return print( o,
true, tag,
true ); }
std::ostream & print(std::ostream &o, bool tableFormat, std::string_view name, bool flag=true, std::string_view fmtHead="%|-48.48s|%|27t|") const
◆ print() [5/6]
Definition at line 172 of file StatEntity.h.
174 return print( o, tableFormat, emptyName,
true );
std::ostream & print(std::ostream &o, bool tableFormat, std::string_view name, bool flag=true, std::string_view fmtHead="%|-48.48s|%|27t|") const
◆ print() [6/6]
Definition at line 176 of file StatEntity.h.
178 return print( o, tableFormat, emptyName,
true );
std::ostream & print(std::ostream &o, bool tableFormat, std::string_view name, bool flag=true, std::string_view fmtHead="%|-48.48s|%|27t|") const
◆ printFormatted() [1/2]
Definition at line 115 of file StatEntity.h.
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
stream & printFormattedImpl(stream &o, const std::string &format) const
◆ printFormatted() [2/2]
Definition at line 118 of file StatEntity.h.
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
stream & printFormattedImpl(stream &o, const std::string &format) const
◆ printFormattedImpl()
template<typename stream >
| stream& StatEntity::printFormattedImpl |
( |
stream & |
o, |
|
|
const std::string & |
format |
|
) |
| const |
|
inline |
Definition at line 110 of file StatEntity.h.
113 return o << fmt.str();
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
EventIDBase min(const EventIDBase &lhs, const EventIDBase &rhs)
EventIDBase max(const EventIDBase &lhs, const EventIDBase &rhs)
◆ 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 121 of file StatEntity.h.
123 ( 0 ==
min() || 1 ==
min() ) && ( 0 ==
max() || 1 ==
max() ) ) {
126 if (
name.empty() ) {
127 constexpr
auto fmt =
"|%|10d| |%|11.5g| |(%|#9.7g| +- %|-#8.7g|)%%| ------- | ------- |";
129 ( efficiencyErr() * 100 );
132 "|%|10d| |%|11.5g| |(%|#9.7g| +- %|-#8.7g|)%%| ------- | ------- |" );
137 constexpr
auto fmt =
"#=%|-7lu| Sum=%|-11.5g| Eff=|(%|#9.7g| +- %|-#8.6g|)%%|";
139 ( efficiencyErr() * 100 );
144 if (
name.empty() ) {
145 constexpr
auto fmt =
"|%|10d| |%|11.7g| |%|#11.5g| |%|#11.5g| |%|#12.5g| |%|#12.5g| |";
150 "|%|10d| |%|11.7g| |%|#11.5g| |%|#11.5g| |%|#12.5g| |%|#12.5g| |" );
152 mean() % standard_deviation() %
min() %
max();
155 constexpr
auto fmt =
"#=%|-7lu| Sum=%|-11.5g| Mean=%|#10.4g| +- %|-#10.5g| Min/Max=%|#10.4g|/%|-#10.4g|";
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
EventIDBase min(const EventIDBase &lhs, const EventIDBase &rhs)
EventIDBase max(const EventIDBase &lhs, const EventIDBase &rhs)
static bool effCounter(std::string_view name)
◆ reset()
| void StatEntity::reset |
( |
| ) |
|
|
inline |
Definition at line 41 of file StatEntity.h.
41 { AccParent::reset(); }
◆ rms()
| double StatEntity::rms |
( |
| ) |
const |
|
inline |
Definition at line 90 of file StatEntity.h.
90 {
return standard_deviation(); }
◆ Rms()
| double StatEntity::Rms |
( |
| ) |
const |
|
inline |
Definition at line 91 of file StatEntity.h.
91 {
return standard_deviation(); }
◆ RMS()
| double StatEntity::RMS |
( |
| ) |
const |
|
inline |
Definition at line 92 of file StatEntity.h.
92 {
return standard_deviation(); }
◆ Sum()
| double StatEntity::Sum |
( |
| ) |
const |
|
inline |
◆ toString()
Definition at line 180 of file StatEntity.h.
std::ostream & print(std::ostream &o, bool tableFormat, std::string_view name, bool flag=true, std::string_view fmtHead="%|-48.48s|%|27t|") const
The documentation for this class was generated from the following file: