|  | ATLAS Offline Software
    | 
 
 
 
Go to the documentation of this file.
    6 #ifndef ACTSUTILS_STAT_H 
    7 #define ACTSUTILS_STAT_H 1 
   28    unsigned int n()
 const { 
return m_n; }
 
   33    double rms()
 const { 
return std::sqrt( 
rms2() ); }
 
   62 template <
class T_Stream>
 
   65    out << std::setw(14) << 
stat.min() << 
" < " 
   66        << std::setw(14) << 
stat.mean() << 
" +- " << std::setw(14) <<  
stat.rms() << 
" < " 
   67        << std::setw(14) << 
stat.max()
 
   68        << 
" / " << std::setw(9) << 
stat.n();
 
   71       out << std::setw(14*4+9+3*3+4) << 
stat.mean();
 
  138          for (
unsigned int bin_i=0; bin_i< 
m_histogram.size(); ++bin_i) {
 
  154       std::stringstream 
msg;
 
  158          const unsigned int w = max_val > 0 ? 
static_cast<unsigned int>(
log(1.*max_val) / 
log(10.))+1 : 1;
 
  161              << std::setw(wtitle) << 
"lower edge"  << 
" |";
 
  165          msg << 
" | " << std::endl;
 
  
Extend Stat helper by an equidistant binned histogram.
Stat & operator+=(const Stat &b)
@breif Add the statistics gathered in the Stat object b
double lowerEdge(unsigned int i) const
Get the lower edge of the given bin.
@ u
Enums for curvilinear frames.
Simple class to gather statistics : min, max, mean, rms.
void add(double val)
@bruef Gather a new value will update min, max and the sums to compute mean and rms
void dumpStat(T_Stream &out, const Stat &stat)
Dump the given statistics object to the given output stream.
StatHist()=default
The default constructor will disable histogramming.
std::string histogramToString() const
Create a string showing the contents of the histogram The string.
StatHist & operator+=(const StatHist &b)
Add the statistucs and histogrammed data fro the given object.
StatHist createEmptyClone()
StatHist(unsigned int n_bins, float xmin, float xmax)
Set up class to also fill a histogram.
void setBinning(unsigned int n_bins, float xmin, float xmax)
Define histogramm bins and enable histogramming.
std::ostream & operator<<(std::ostream &out, const Stat &stat)
void reset()
Set statistics to zero.
void add(double val)
Gather statistics and fill the histogram if not disabled.
void reset()
Set histogram contents and statistics to zero.
std::vector< unsigned int > m_histogram