class Histogram1 Histogram API.
| | xbin_t Axis type; |
| | histdata_t Bin content type; |
| | stat_t Statistics type; |
| | Histogram1 () Default constructor. |
| | Histogram1 (const Histogram1& h) Copy Constructor. |
| | Histogram1 (const char* name, int nbinx, xbin_t xmin, xbin_t xmax, const char* xlabel = "", const char* nlabel = "") Dataless constructor. |
| | Histogram1 (const char* name, int nbinx, const xbin_t* xbins, const char* xlabel = "", const char* nlabel = "") Dataless constructor. |
| | ~Histogram1 () Histogram1 Destructor. |
| | Clear () Clear bin contents, number of data entries and time. |
| | Dump (std::ostream& out) const Output formatted dump of the Histogram1 data. |
| | Fill (xbin_t x, double w = 1.0) Increment the corresponding bin to the data by the weight. |
| | FillN (int ntimes, const xbin_t* x) Increment corresponding bins to each element of the data array. |
| | FillN (int ntimes, const xbin_t* x, const double* w) Increment corresponding bins to each data array element by given weights. |
| | GetBinContents (histdata_t* data) const Copy bin contens to a double array. |
| | GetBinLowEdges (xbin_t* bin) const Copy low-edges and upper edge to a double array. |
| | GetBinLowEdge (int n) const Return low-edge of the n-th bin. |
| | GetBinContent (int n) const Return the n-th bin content. |
| | GetBinCenter (int n) const Return the center of n-th bin content. |
| | GetBinErrors (stat_t* err) const Copy the error of bins to an array. |
| | GetBinError (int n) const Return the n-th bin error. |
| | GetBinNumber (xbin_t x) const Return the bin number. |
| | GetBinSpacing (void) const Return bin spacing for fixed bin spacing histogram. |
| | GetNEntries (void) const Return the number of data entries. |
| | GetNBins (void) const Return the number of bins. |
| | GetTitle (void) const Return title of the histogram. |
| | GetXLabel (void) const Return X-axis label. |
| | GetNLabel (void) const Return bin-count axis label. |
| | GetMinContent (void) const Return the minimum of bin contents. |
| | GetMaxContent (void) const Return the maximum of bin contents. |
| | GetMinContentBin (void) const Return the bin number for the minimum bin content. |
| | GetMaxContentBin (void) const Return the bin number for the maximum bin content. |
| | GetMean (void) const Return the mean value. |
| | GetSdev (void) const Return the standard deviation. |
| | GetStats (stat_t *stats) const Copy statistics of the histogram to an array. |
| | PutStats (const stat_t *stats) Replace the statistics of the histogram. |
| | GetBinType (void) const Return the bin type. |
| | GetTime (void) const Return GPS time. |
| | IsErrorFlagON (void) const Return true, if bin errors are defined. |
| | SetTitle (const char* name) Set the histogram title. |
| | SetXLabel (const char* xlabel) Set the X-axis label. |
| | SetNLabel (const char* nlabel) Set the bin-count axis label. |
| | SetBinLowEdges (int nbinx, xbin_t xmin, xbin_t xmax) Set the histogram bins. |
| | SetBinLowEdges (int nbinx, const xbin_t* xbins) Set the histogram bins. |
| | SetBinContents (const histdata_t* data) Replace the contents of bins. |
| | SetBinContent (int n, histdata_t content) Replace n-th bin content. |
| | SetBinErrors (const stat_t* err) Replace errors of bins. |
| | SetBinError (int n, stat_t err) Replace n-th bin error. |
| | SetNEntries (int n) Replace the number of entries with new number. |
| | SetNBins (int nbinx) Set number of bins. |
| | SetBinType (int n) Set the bin type. |
| | SetTime (const Time& t) Set a time stamp (GPS). |
| | Sumw2 (bool reset = true) Clear or Update errors of bins based on the current bin content. |
| | Reset (void) Clear all the histogram data. |
| | operator [] (int n) const Get the reference to the n-th bin. |
| | operator = (const Histogram1& h) Copy histogram. |
| | operator += (const Histogram1& h) Add a histogram to the current histogram. |
| | operator += (histdata_t bias) Add a bias to each bin. |
| | operator -= (const Histogram1& h) Subtract the histogram from the current histogram. |
| | operator *= (double scale) Multiply bin contents by a scalar. |
| | operator *= (const Histogram1& h) Multiply current Histogram1 by the argument histogram. |
| | operator /= (const Histogram1& h) Divide bin contents by bin contents of the argument histogram. |
| | Allocate (int nbin = 0) Free old memory, then allocate new memory |
The Histogram1 class holds a 1-dimensional histogram data.
typedef double histdata_t
typedef double stat_t
void Allocate(int nbin = 0)
Histogram1()
Histogram1(const Histogram1& h)
Histogram1(const char* name, int nbinx, xbin_t xmin, xbin_t xmax, const char* xlabel = "", const char* nlabel = "")
xmin - lower edge.
xmax - upper edge.
xlabel - labe for the X-axis.
nlabel - upper for the bin content axis.
Histogram1(const char* name, int nbinx, const xbin_t* xbins, const char* xlabel = "", const char* nlabel = "")
xbins - array of lower-edges for each bin
(the last element is the upper edge).
xlabel - label for the X-axis.
nlabel - upper for the bin content axis.
virtual ~Histogram1()
virtual void Clear()
virtual std::ostream& Dump(std::ostream& out) const
virtual void Fill(xbin_t x, double w = 1.0)
w - Weight.
virtual void FillN(int ntimes, const xbin_t* x)
x - Data array.
virtual void FillN(int ntimes, const xbin_t* x, const double* w)
x - Data array.
w - Array of weights.
virtual void GetBinContents(histdata_t* data) const
virtual void GetBinLowEdges(xbin_t* bin) const
virtual xbin_t GetBinLowEdge(int n) const
1 to N low-edges of n-th bin
N+1 Upper edge
virtual histdata_t GetBinContent(int n) const
virtual xbin_t GetBinCenter(int n) const
virtual bool GetBinErrors(stat_t* err) const
virtual stat_t GetBinError(int n) const
virtual int GetBinNumber(xbin_t x) const
virtual xbin_t GetBinSpacing(void) const
virtual int GetNEntries(void) const
virtual int GetNBins(void) const
virtual const char* GetTitle(void) const
virtual const char* GetXLabel(void) const
virtual const char* GetNLabel(void) const
virtual histdata_t GetMinContent(void) const
virtual histdata_t GetMaxContent(void) const
virtual int GetMinContentBin(void) const
virtual int GetMaxContentBin(void) const
virtual stat_t GetMean(void) const
virtual stat_t GetSdev(void) const
virtual void GetStats(stat_t *stats) const
stats[0] Sum of weight
stats[1] Sum of weight^2
stats[2] Sum of weight * data
stats[3] Sum of weight * data^2
virtual void PutStats(const stat_t *stats)
stats[0] Sum of weight
stats[1] Sum of weight^2
stats[2] Sum of weight * data
stats[3] Sum of weight * data^2
virtual int GetBinType(void) const
0 Undefined
1 Fixed Bin
2 Variable Bin
virtual Time GetTime(void) const
virtual bool IsErrorFlagON(void) const
virtual void SetTitle(const char* name)
virtual void SetXLabel(const char* xlabel)
virtual void SetNLabel(const char* nlabel)
virtual void SetBinLowEdges(int nbinx, xbin_t xmin, xbin_t xmax)
xmin - Lower edge.
xmax - Upper edge.
virtual void SetBinLowEdges(int nbinx, const xbin_t* xbins)
xbins - Array of low-edges (the last element is the upper edge).
virtual void SetBinContents(const histdata_t* data)
virtual void SetBinContent(int n, histdata_t content)
content - New content.
virtual void SetBinErrors(const stat_t* err)
virtual bool SetBinError(int n, stat_t err)
content - New content.
virtual void SetNEntries(int n)
virtual void SetNBins(int nbinx)
virtual void SetBinType(int n)
virtual void SetTime(const Time& t)
virtual void Sumw2(bool reset = true)
virtual void Reset(void)
virtual const histdata_t& operator [] (int n) const
Histogram1& operator = (const Histogram1& h)
Histogram1& operator += (const Histogram1& h)
Histogram1& operator += (histdata_t bias)
Histogram1& operator -= (const Histogram1& h)
Histogram1& operator *= (double scale)
Histogram1& operator *= (const Histogram1& h)
Histogram1& operator /= (const Histogram1& h)
alphabetic index hierarchy of classes
Please send questions and comments to zweizig_j@ligo.caltech.edu
generated by doc++