|
BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
Class to Sum histogram. More...
#include <HistogramAccumulatorSum.hh>


Public Member Functions | |
| HistogramAccumulatorSum () | |
| Public constructor only for compatibility with ROOT - not intended for use. | |
| HistogramAccumulatorSum (TH1 *baseHistogram, int nDimensionsIn, const std::string &resultHistName, const std::string &resultHistTitle) | |
| Constructor simply passes down to base class. | |
| virtual void | Accumulate (TH1 *newValue) |
| Use TH1::Add which works on 1,2 and 3D histograms. | |
| virtual TH1 * | Terminate () |
| Simply return the result as it's already the correct result. | |
| ClassDef (HistogramAccumulatorSum, 1) | |
Public Member Functions inherited from HistogramAccumulator | |
| HistogramAccumulator () | |
| Default constructor only for ROOT reflexivity - not intended for use. | |
| HistogramAccumulator (TH1 *baseHistogram, const std::string &resultHistNameIn, const std::string &resultHistTitleIn) | |
| HistogramAccumulator (TH1 *baseHistogram, int nDimensionsIn, const std::string &resultHistName, const std::string &resultHistTitle) | |
| virtual | ~HistogramAccumulator () |
| TH1 * | Result () const |
| Accessor. | |
| void | AddNEmptyEntries (unsigned long i) |
| unsigned long | N () const |
| Access currently accumulated number of entries. | |
Additional Inherited Members | |
Protected Member Functions inherited from HistogramAccumulator | |
| virtual void | AccumulateSingleValue (double oldMean, double oldVari, double x, double xVari, unsigned long nEntriesAccumulated, unsigned long nEntriesToAccumulate, double &newMean, double &newVari) const |
| ClassDef (HistogramAccumulator, 1) | |
Protected Attributes inherited from HistogramAccumulator | |
| int | nDimensions |
| Number of dimensions. | |
| unsigned long | n |
| Counter. | |
| bool | terminated |
| Whether this instance has been finished. | |
| const std::string | resultHistName |
| Name for resultant histogram. | |
| const std::string | resultHistTitle |
| Title for resultant histogram. | |
| TH1 * | mean |
| TH1 * | variance |
| TH1 * | result |
Class to Sum histogram.
This overrides two methods for the accumulation to do the simple sum using TH1::Add.
Definition at line 38 of file HistogramAccumulatorSum.hh.
| HistogramAccumulatorSum::HistogramAccumulatorSum | ( | TH1 * | baseHistogram, |
| int | nDimensionsIn, | ||
| const std::string & | resultHistName, | ||
| const std::string & | resultHistTitle | ||
| ) |
Constructor simply passes down to base class.
Definition at line 29 of file HistogramAccumulatorSum.cc.
|
inlinevirtual |
Definition at line 50 of file HistogramAccumulatorSum.hh.
|
virtual |
Use TH1::Add which works on 1,2 and 3D histograms.
Reimplemented from HistogramAccumulator.
Definition at line 41 of file HistogramAccumulatorSum.cc.
|
virtual |
Simply return the result as it's already the correct result.
Reimplemented from HistogramAccumulator.
Definition at line 46 of file HistogramAccumulatorSum.cc.