Analysis Software
Documentation for sPHENIX simulation software
|
One-dimensional histogram. More...
#include <KFParticle/blob/master/KFParticlePerformance/KFPHistogram/KFPHistogram1D.h>
Public Member Functions | |
KFPHistogram1D () | |
KFPHistogram1D (std::string name, int nBins, float minX, float maxX) | |
Constructor with user-defined parameters. | |
~KFPHistogram1D () | |
int * | GetHistogram () const |
Returns a pointer to the histogram data. | |
std::string | Name () const |
Returns name of the histogram. | |
float | MinBin () const |
returns minimum of the X axis. | |
float | MaxBin () const |
Returns maximum of the X axis. | |
int | NBins () const |
Returns number of bins. | |
int | DataSize () const |
Returns number of bins plus underflow and overflow bins. | |
int | Size () const |
Returns number of bins plus underflow and overflow bins. | |
void | SetBinContent (int iBin, int value) |
Sets the value of the bin "iBin". | |
void | SetHistogramMemory (int *pointer) |
Sets the pointer to the memory with the histogram. | |
void | Fill (float value) |
void | operator+= (const KFPHistogram1D &h) |
KFPHistogram1D (const KFPHistogram1D &h) | |
const KFPHistogram1D & | operator= (const KFPHistogram1D &h) |
Private Attributes | |
int * | fHistogram |
Pointer to the array with the values of the histogram. | |
int | fSize |
Number of bins +2, additional two bins are reserved for the underflow and overflow. | |
std::string | fName |
Name of the histogram. | |
float | fMinBin |
Minimum value at the X axis. | |
float | fMaxBin |
Maximum value at the X axis. | |
One-dimensional histogram.
The class is used to collect one-dimensional histograms in the environment, where ROOT is not available, for example at Intel Xeon Phi cards. It contains the histogram itself, number of bins, its name, minimum and maximum value of the axis. The histogram memory is allocated externally (by KFPHistogram) for better performance.
Definition at line 44 of file KFPHistogram1D.h.
View newest version in sPHENIX GitHub at line 44 of file KFPHistogram1D.h
|
inline |
Definition at line 48 of file KFPHistogram1D.h.
View newest version in sPHENIX GitHub at line 48 of file KFPHistogram1D.h
|
inline |
Constructor with user-defined parameters.
Definition at line 49 of file KFPHistogram1D.h.
View newest version in sPHENIX GitHub at line 49 of file KFPHistogram1D.h
|
inline |
Definition at line 51 of file KFPHistogram1D.h.
View newest version in sPHENIX GitHub at line 51 of file KFPHistogram1D.h
|
inline |
The copy-constructor. Memory for the fHistogram is not allocated, only the pointer is copied.
Definition at line 94 of file KFPHistogram1D.h.
View newest version in sPHENIX GitHub at line 94 of file KFPHistogram1D.h
|
inline |
Returns number of bins plus underflow and overflow bins.
Definition at line 58 of file KFPHistogram1D.h.
View newest version in sPHENIX GitHub at line 58 of file KFPHistogram1D.h
References fSize.
Referenced by KFPHistogramSet::SetHistogramMemory().
|
inline |
Adds "value" to the histogram: calculates the corresponding bin and adds one there.
Definition at line 65 of file KFPHistogram1D.h.
View newest version in sPHENIX GitHub at line 65 of file KFPHistogram1D.h
References fHistogram, fMaxBin, fMinBin, and fSize.
Referenced by KFPHistogramSet::Fill().
|
inline |
Returns a pointer to the histogram data.
Definition at line 53 of file KFPHistogram1D.h.
View newest version in sPHENIX GitHub at line 53 of file KFPHistogram1D.h
References fHistogram.
|
inline |
Returns maximum of the X axis.
Definition at line 56 of file KFPHistogram1D.h.
View newest version in sPHENIX GitHub at line 56 of file KFPHistogram1D.h
References fMaxBin.
|
inline |
returns minimum of the X axis.
Definition at line 55 of file KFPHistogram1D.h.
View newest version in sPHENIX GitHub at line 55 of file KFPHistogram1D.h
References fMinBin.
|
inline |
Returns name of the histogram.
Definition at line 54 of file KFPHistogram1D.h.
View newest version in sPHENIX GitHub at line 54 of file KFPHistogram1D.h
References fName.
|
inline |
Returns number of bins.
Definition at line 57 of file KFPHistogram1D.h.
View newest version in sPHENIX GitHub at line 57 of file KFPHistogram1D.h
References fSize.
|
inline |
Adds histogram "h" to the current histogram bin-by-bin.
Definition at line 80 of file KFPHistogram1D.h.
View newest version in sPHENIX GitHub at line 80 of file KFPHistogram1D.h
References fHistogram, fName, fSize, and i.
|
inline |
Copies object "h" to the current object. Memory for the fHistogram is not allocated, only the pointer is copied. Returns the current object.
Definition at line 99 of file KFPHistogram1D.h.
View newest version in sPHENIX GitHub at line 99 of file KFPHistogram1D.h
References fHistogram, fMaxBin, fMinBin, fName, and fSize.
|
inline |
Sets the value of the bin "iBin".
Definition at line 61 of file KFPHistogram1D.h.
View newest version in sPHENIX GitHub at line 61 of file KFPHistogram1D.h
References fHistogram, and value.
Referenced by KFPHistogramSet::SetHisto1DBinContent().
|
inline |
Sets the pointer to the memory with the histogram.
Definition at line 62 of file KFPHistogram1D.h.
View newest version in sPHENIX GitHub at line 62 of file KFPHistogram1D.h
References fHistogram.
Referenced by KFPHistogramSet::SetHistogramMemory().
|
inline |
Returns number of bins plus underflow and overflow bins.
Definition at line 59 of file KFPHistogram1D.h.
View newest version in sPHENIX GitHub at line 59 of file KFPHistogram1D.h
References fSize.
|
private |
Pointer to the array with the values of the histogram.
Definition at line 111 of file KFPHistogram1D.h.
View newest version in sPHENIX GitHub at line 111 of file KFPHistogram1D.h
Referenced by Fill(), GetHistogram(), operator+=(), operator=(), SetBinContent(), and SetHistogramMemory().
|
private |
Maximum value at the X axis.
Definition at line 116 of file KFPHistogram1D.h.
View newest version in sPHENIX GitHub at line 116 of file KFPHistogram1D.h
Referenced by Fill(), MaxBin(), and operator=().
|
private |
Minimum value at the X axis.
Definition at line 115 of file KFPHistogram1D.h.
View newest version in sPHENIX GitHub at line 115 of file KFPHistogram1D.h
Referenced by Fill(), MinBin(), and operator=().
|
private |
Name of the histogram.
Definition at line 114 of file KFPHistogram1D.h.
View newest version in sPHENIX GitHub at line 114 of file KFPHistogram1D.h
Referenced by Name(), operator+=(), and operator=().
|
private |
Number of bins +2, additional two bins are reserved for the underflow and overflow.
Definition at line 112 of file KFPHistogram1D.h.
View newest version in sPHENIX GitHub at line 112 of file KFPHistogram1D.h
Referenced by DataSize(), Fill(), NBins(), operator+=(), operator=(), and Size().