CMS 3D CMS Logo

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 24 of file Accumulator.cc.

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

24  {
25  os << "entries: " << stat.nEntries();
26  if (stat.nEntries() > 0) {
27  os << " Mean: " << stat.mean();
28  }
29  if (stat.nEntries() > 1) {
30  os << " Sigma: " << stat.sigma();
31  }
32  return os;
33 }
double mean() const
Definition: Accumulator.cc:14
unsigned long nEntries() const
Definition: Accumulator.h:26
double sigma() const
Definition: Accumulator.h:22