PSHist::Axis Class Reference
[PSHist package]

Axis class defines the binning parameters for H1 and H2 histogram axes. More...

#include <Axis.h>

List of all members.

Public Member Functions

 Axis (unsigned nbins, double amin, double amax)
 Create axis with fixed bin sizes.
 Axis (unsigned nbins, const double *edges)
 Create axis with variable bin sizes.
double amin () const
 Get low edge of range, makes sense to call only for fixed-width bins.
double amax () const
 Get high edge of range, makes sense to call only for fixed-width bins.
unsigned nbins () const
 Get number of bins.
const double * edges () const
 Get array of edges, will return zero pointer for fixed-width bins.
void print (std::ostream &out) const


Detailed Description

Axis class defines the binning parameters for H1 and H2 histogram axes.

This class can be used to define both same-width and variable-width binnings for histograms. Type of the binning is defined by the constructor used to instantiate Axis object.

This software was developed for the LCLS project. If you use all or part of it, please give an appropriate acknowledgment.

See also:
HManager
Version:
Id
Axis.h 2050 2011-06-29 21:30:05Z salnikov@SLAC.STANFORD.EDU
Author:
Mikhail S. Dubrovin

Definition at line 44 of file Axis.h.


Constructor & Destructor Documentation

PSHist::Axis::Axis ( unsigned  nbins,
double  amin,
double  amax 
)

Create axis with fixed bin sizes.

Parameters:
[in] nbins Number of bins.
[in] amin Low edge of the first bin.
[in] amax High edge of the last bin.
Exceptions:
ExceptionBins thrown when number of bins is 0
ExceptionAxisRange thrown when amin is equal or higher that amax

Definition at line 41 of file Axis.cpp.

PSHist::Axis::Axis ( unsigned  nbins,
const double *  edges 
)

Create axis with variable bin sizes.

Parameters:
[in] nbins Number of bins.
[in] edges Array of the histogram edges, size of the array is nbins+1, it should contain ordered values for low edges of all bins plus high edge of last bin.
Exceptions:
ExceptionBins thrown when number of bins is 0
ExceptionAxisEdgeOrder thrown when edges are not ordered

Definition at line 51 of file Axis.cpp.


Member Function Documentation

double PSHist::Axis::amax (  )  const [inline]

Get high edge of range, makes sense to call only for fixed-width bins.

Definition at line 78 of file Axis.h.

double PSHist::Axis::amin (  )  const [inline]

Get low edge of range, makes sense to call only for fixed-width bins.

Definition at line 75 of file Axis.h.

const double * PSHist::Axis::edges (  )  const

Get array of edges, will return zero pointer for fixed-width bins.

Definition at line 65 of file Axis.cpp.

unsigned PSHist::Axis::nbins (  )  const [inline]

Get number of bins.

Definition at line 81 of file Axis.h.

void PSHist::Axis::print ( std::ostream &  out  )  const

Definition at line 73 of file Axis.cpp.


The documentation for this class was generated from the following files:
Generated on 19 Dec 2016 for PSANAclasses by  doxygen 1.4.7