Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DHistogram Class Reference

#include <DHistogram.h>

Public Member Functions

 DHistogram (int Nbins, float lowEdge, float highEdge)
 
 DHistogram (const DHistogram &hsrc)
 
virtual ~DHistogram ()
 
void Add (const DHistogram *h)
 
float Fill (float x, float weight=1.0)
 
int FindBin (float x) const
 
int FindFirstBinAbove (float val, int start_bin=1) const
 
int FindFirstNonZeroBin (void) const
 
int FindLastNonZeroBin (void) const
 
int GetNbins (void) const
 
float GetBinLowEdge (int bin) const
 
float GetBinCenter (int bin) const
 
float GetBinContent (int bin) const
 
float GetBinWidth (void) const
 
float GetLowEdge (void) const
 
float GetHighEdge (void) const
 
float * GetContentPointer (void) const
 CAUTION! More...
 
float Integral (void) const
 
TH1D * MakeTH1D (string name, string title) const
 
void Reset (void)
 
void Scale (float scale)
 
void SetBinContent (int bin, float val)
 
DHistogramoperator= (const DHistogram &hsrc)
 

Private Member Functions

 DHistogram ()
 

Private Attributes

int Nbins
 
float lowEdge
 
float highEdge
 
float binWidth
 
float half_binWidth
 
float bin_zero_center
 
float * content
 

Detailed Description

Definition at line 20 of file DHistogram.h.

Constructor & Destructor Documentation

DHistogram::DHistogram ( int  Nbins,
float  lowEdge,
float  highEdge 
)
inline

Definition at line 72 of file DHistogram.h.

References bin_zero_center, binWidth, content, half_binWidth, highEdge, lowEdge, and Nbins.

DHistogram::DHistogram ( const DHistogram hsrc)
inline

Definition at line 96 of file DHistogram.h.

DHistogram::~DHistogram ( )
inlinevirtual

Definition at line 104 of file DHistogram.h.

References content.

DHistogram::DHistogram ( )
private

Member Function Documentation

void DHistogram::Add ( const DHistogram h)
inline

Definition at line 112 of file DHistogram.h.

References _DBG_, binWidth, content, GetBinContent(), GetBinWidth(), GetNbins(), and Nbins.

float DHistogram::Fill ( float  x,
float  weight = 1.0 
)
inline

Definition at line 173 of file DHistogram.h.

References binWidth, content, lowEdge, and Nbins.

Referenced by DEventSourceHDDM::Extract_DBCALSiPMSpectrum().

int DHistogram::FindBin ( float  x) const
inline

Definition at line 127 of file DHistogram.h.

References binWidth, and lowEdge.

int DHistogram::FindFirstBinAbove ( float  val,
int  start_bin = 1 
) const
inline

Definition at line 137 of file DHistogram.h.

References content, and Nbins.

int DHistogram::FindFirstNonZeroBin ( void  ) const
inline

Definition at line 149 of file DHistogram.h.

References content, and Nbins.

int DHistogram::FindLastNonZeroBin ( void  ) const
inline

Definition at line 161 of file DHistogram.h.

References content, and Nbins.

float DHistogram::GetBinCenter ( int  bin) const
inline

Definition at line 202 of file DHistogram.h.

References bin_zero_center, binWidth, and Nbins.

float DHistogram::GetBinContent ( int  bin) const
inline

Definition at line 212 of file DHistogram.h.

References content, and Nbins.

Referenced by Add().

float DHistogram::GetBinLowEdge ( int  bin) const
inline

Definition at line 194 of file DHistogram.h.

References binWidth, and lowEdge.

float DHistogram::GetBinWidth ( void  ) const
inline

Definition at line 222 of file DHistogram.h.

References binWidth.

Referenced by Add().

float * DHistogram::GetContentPointer ( void  ) const
inline

CAUTION!

Definition at line 246 of file DHistogram.h.

References content.

float DHistogram::GetHighEdge ( void  ) const
inline

Definition at line 238 of file DHistogram.h.

References highEdge.

Referenced by operator=().

float DHistogram::GetLowEdge ( void  ) const
inline

Definition at line 230 of file DHistogram.h.

References lowEdge.

Referenced by operator=().

int DHistogram::GetNbins ( void  ) const
inline

Definition at line 186 of file DHistogram.h.

References Nbins.

Referenced by Add(), and operator=().

float DHistogram::Integral ( void  ) const
inline

Definition at line 254 of file DHistogram.h.

References content, I, and Nbins.

TH1D * DHistogram::MakeTH1D ( string  name,
string  title 
) const
inline

Definition at line 266 of file DHistogram.h.

References content, h, highEdge, lowEdge, and Nbins.

DHistogram & DHistogram::operator= ( const DHistogram hsrc)
inline
void DHistogram::Reset ( void  )
inline

Definition at line 278 of file DHistogram.h.

References content, and Nbins.

void DHistogram::Scale ( float  scale)
inline

Definition at line 286 of file DHistogram.h.

References content, and Nbins.

void DHistogram::SetBinContent ( int  bin,
float  val 
)
inline

Definition at line 294 of file DHistogram.h.

References content, and Nbins.

Member Data Documentation

float DHistogram::bin_zero_center
private

Definition at line 63 of file DHistogram.h.

Referenced by DHistogram(), GetBinCenter(), and operator=().

float DHistogram::binWidth
private
float DHistogram::half_binWidth
private

Definition at line 62 of file DHistogram.h.

Referenced by DHistogram(), and operator=().

float DHistogram::highEdge
private

Definition at line 60 of file DHistogram.h.

Referenced by DHistogram(), GetHighEdge(), MakeTH1D(), and operator=().

float DHistogram::lowEdge
private

Definition at line 59 of file DHistogram.h.

Referenced by DHistogram(), Fill(), FindBin(), GetBinLowEdge(), GetLowEdge(), MakeTH1D(), and operator=().


The documentation for this class was generated from the following file: