My Project
|
converter from event type data to histogram in 1d More...
#include <GslHistogram.hh>
Public Member Functions | |
GslHistogram (Double *Bin, UInt4 Size, UInt4 _NumOfMulTh=1) | |
~GslHistogram () | |
UInt4 | PutHistSize () |
PyObject * | PutHistogramList () |
vector< Double > | PutHistogram () |
vector< Double > | PutHistogramErr () |
PyObject * | PutHistogramErrList () |
void | Increment (Double x, UInt4 ThNum=0, Double Weight=1.0) |
void | Increment (vector< Double > x, UInt4 ThNum=0) |
void | Increment (vector< Int4 > x, UInt4 ThNum=0) |
void | Dump () |
void | Reset () |
gsl_histogram * | PutHistPointer (UInt4 ThNum=0) |
vector< Double > | PutBin () |
PyObject * | PutBinList () |
Double | PutHistogramSum () |
converter from event type data to histogram in 1d
This class is a converter from a set of event data to a histogram data.
The procedure of conversion is following,
(1) The boundary of the histogram bin is set with the constructor of this class. (2) The event data is filled into the histogram bins with "Increment(Double,Double)" or "Increment(vector<Double>)". (3) The result of the conversion is obtained with "PutHistogram()".
GslHistogram::GslHistogram | ( | Double * | Bin, |
UInt4 | Size, | ||
UInt4 | _NumOfMulTh = 1 |
||
) |
Constructor. The bins of the histogram will be set with the arguments. The each value of the array is the boundary of the bins.
Destructor
void GslHistogram::Dump | ( | ) | [inline] |
This method dumps All data stored in this class to stdout.
void GslHistogram::Increment | ( | Double | x, |
UInt4 | ThNum = 0 , |
||
Double | Weight = 1.0 |
||
) |
The second argument is ommitted, this method updates the histogram by adding 1.0 to the bin whose range contains the value of "x". The second value is not ommitted, this method increase the value by the number of "Weight".
void GslHistogram::Increment | ( | vector< Double > | x, |
UInt4 | ThNum = 0 |
||
) |
Each value of x is filled into the histogram. "Increment(Double,1.0)" is executed in this method.
void GslHistogram::Increment | ( | vector< Int4 > | x, |
UInt4 | ThNum = 0 |
||
) |
Each value of x is filled into the histogram. "Increment(Double,1.0)" is executed in this method.
vector< Double > GslHistogram::PutBin | ( | ) |
Returns bin boundaries. The size of returnd vector is PutHistSize()+1.
PyObject* GslHistogram::PutBinList | ( | ) | [inline] |
Returns bin boundaries. The size of returnd list is PutHistSize()+1.
vector< Double > GslHistogram::PutHistogram | ( | ) |
This method returns a vector object. The vector object has the contents of each bin of the histogram.
vector< Double > GslHistogram::PutHistogramErr | ( | ) |
This method returns a vector object. The vector object has the error values corresponding with the vector returned by "PutHistogram()".
PyObject* GslHistogram::PutHistogramErrList | ( | ) | [inline] |
This method returns a vector object. The vector object has the error values corresponding with the vector returned by "PutHistogram()".
PyObject* GslHistogram::PutHistogramList | ( | ) | [inline] |
This method returns a vector object. The vector object has the contents of each bin of the histogram.
Double GslHistogram::PutHistogramSum | ( | ) |
Returns the sum of all bin values.
gsl_histogram* GslHistogram::PutHistPointer | ( | UInt4 | ThNum = 0 | ) | [inline] |
The return value of this method is the pointer of "gsl_histogram". You can use all functions prepared in the gsl-library with the pointer.
UInt4 GslHistogram::PutHistSize | ( | ) | [inline] |
Returns the number of bins.
void GslHistogram::Reset | ( | ) |
This method clears all data stored with "Increment(double,double)".