5#ifndef ALGO_QA_HISTO1D_H
6#define ALGO_QA_HISTO1D_H 1
8#include <boost/serialization/access.hpp>
9#include <boost/serialization/version.hpp>
34 Histo1D(uint32_t numBins,
double minValue,
double maxValue,
const std::string& name =
"",
35 const std::string& title =
"");
50 void Add(
double value,
double weight = 1.);
61 double Content(uint32_t bin)
const;
128 template<
class Archive>
double Content(uint32_t bin) const
Histogram content in a bin.
void Clear()
Clear histogram contents.
const std::string & Title() const
Histogram name.
uint32_t NumBins() const
Number of bins.
double Stddev() const
Second moment of distribution.
const std::string & Name() const
Histogram name.
void serialize(Archive &ar, const unsigned int)
virtual ~Histo1D()=default
Destructor.
Histo1D(const Histo1D &)=default
Copy constructor: needed for boost serialization of vector of Histo1D.
double Mean() const
First moment of distribution.
double Overflow() const
Overflow.
Histo1D & operator+=(const Histo1D &other)
Add another histogram to an existing one.
std::string ToString() const
Properties to string.
void Add(double value, double weight=1.)
Add an entry to the histogram.
double MaxValue() const
Upper edge.
double Underflow() const
Underflow.
std::vector< double > fContent
Histo1D()
Default constructor: needed for boost serialization of vector of Histo1D, need copy ctor call after!
friend class boost::serialization::access
double NumEntries() const
Number of entries.
double MinValue() const
Lower edge.
Histo1D operator+(Histo1D h1, const Histo1D &h2)
Adding two histograms.