test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Functions
Accumulator.h File Reference
#include <iosfwd>
#include <cmath>

Go to the source code of this file.

Classes

class  Accumulator
 

Functions

std::ostream & operator<< (std::ostream &os, const Accumulator &stat)
 

Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const Accumulator stat 
)

Definition at line 40 of file Accumulator.cc.

References Accumulator::mean(), Accumulator::nEntries(), and Accumulator::sigma().

40  {
41  os << "entries: " << stat.nEntries();
42  if(stat.nEntries() > 0) {
43  os << " Mean: " << stat.mean();
44  }
45  if(stat.nEntries() > 1) {
46  os << " Sigma: " << stat.sigma();
47  }
48  return os;
49 }
double mean() const
Definition: Accumulator.cc:23
unsigned long nEntries() const
Definition: Accumulator.h:27
double sigma() const
Definition: Accumulator.h:23