#include <rootHist.h>
Public Methods | |
| rootHist (int bins) | |
| Constructor takes number of bins for histogram. More... | |
| rootHist (const rootHist &oldHist) | |
| ~rootHist (void) | |
| void | updateBin (int binNumber, double data) |
| Stores a number in the specified bin. More... | |
| double | retrieveBin (int binNumber) |
| Returns the contents of the specified bin. More... | |
Private Attributes | |
| double * | hist |
| The histogram. More... | |
| const int | num_bins |
| The number of bins in the histogram. More... | |
Definition at line 13 of file rootHist.h.
|
|
Constructor takes number of bins for histogram.
Definition at line 10 of file rootHist.cxx. References hist, and num_bins.
00010 : num_bins(bins) 00011 { 00012 if(bins <= 0) 00013 { 00014 std::cerr << "ERROR in constructor for roothist:\n" 00015 " The total number of bins must be greater than zero." 00016 << std::endl; 00017 exit(0); 00018 } 00019 00020 hist = new double[num_bins]; 00021 for (int i = 0; i < num_bins; i++) hist[i] = 0; 00022 } |
|
|
Definition at line 30 of file rootHist.cxx. References hist, and num_bins.
|
|
|
Definition at line 24 of file rootHist.cxx. References hist.
|
|
|
Returns the contents of the specified bin. The bin numbering goes from 0 to (total number of bins - 1). Definition at line 48 of file rootHist.cxx. References hist, and num_bins. Referenced by rootEnergyHist::apply(), rootAngleHist::apply(), rootEnergyHist::retrieveCount(), rootEnergyHist::retrieveFlux(), rootEnergyHist::retrieveFluxUncertainty(), rootAngleHist::retrievePhiCount(), rootAngleHist::retrievePhiFlux(), rootAngleHist::retrievePhiFluxUncertainty(), rootAngleHist::retrieveThetaCount(), rootAngleHist::retrieveThetaFlux(), rootAngleHist::retrieveThetaFluxUncertainty(), rootEnergyHist::store(), rootAngleHist::storePhi(), and rootAngleHist::storeTheta().
|
|
||||||||||||
|
Stores a number in the specified bin.
Definition at line 37 of file rootHist.cxx. References hist, and num_bins. Referenced by rootEnergyHist::apply(), rootAngleHist::apply(), rootEnergyHist::reset(), rootAngleHist::reset(), rootAngleHist::rootAngleHist(), rootEnergyHist::rootEnergyHist(), rootEnergyHist::store(), rootAngleHist::storePhi(), and rootAngleHist::storeTheta().
|
|
|
The histogram.
Definition at line 31 of file rootHist.h. Referenced by retrieveBin(), rootHist(), updateBin(), and ~rootHist(). |
|
|
The number of bins in the histogram.
Definition at line 32 of file rootHist.h. Referenced by retrieveBin(), rootHist(), and updateBin(). |
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001