Main Page | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members | Related Pages

HistoRandomFun Class Reference

#include <RandomFuns.h>

Inheritance diagram for HistoRandomFun:

Inheritance graph
[legend]
Collaboration diagram for HistoRandomFun:

Collaboration graph
[legend]
List of all members.

Detailed Description

A FloatFun that returns a random number distributed according to a histogram.

Definition at line 190 of file RandomFuns.h.

Public Member Functions

 HistoRandomFun (const FloatFun &rnd_, const TH1 &histo, const char *name_=0)
 Constructor from a C style string, serves as default constructor.

 HistoRandomFun (const FloatFun &rnd_, const TH1 &histo, const std::string &name_)
 Constructor from a C++ string.

virtual Float_FF operator() () const
 Returns a random value, distributed according to the histogram.

virtual const FillIteratorgetIterator () const
 Returns pointer to iterator, if any.


Protected Member Functions

void init (const TH1 &histo)
 Initialization.

virtual ~HistoRandomFun ()
 Protected destructor ensures creation on the heap.


Protected Attributes

const FloatFunrnd
 The gaussian random function.

int nbins
 The number of bins.

double * edges
 The bin edges.

double * values


Constructor & Destructor Documentation

HistoRandomFun::HistoRandomFun const FloatFun rnd_,
const TH1 &  histo,
const char *  name_ = 0
[explicit]
 

Constructor from a C style string, serves as default constructor.

Parameters:
rnd_  The random function
histo  The histogram
name_  An optional name

Definition at line 180 of file RandomFuns.C.

References init().

HistoRandomFun::HistoRandomFun const FloatFun rnd_,
const TH1 &  histo,
const std::string &  name_
 

Constructor from a C++ string.

Parameters:
rnd_  The random function
histo  The histogram
name_  An optional name

Definition at line 189 of file RandomFuns.C.

References init().


Member Function Documentation

void HistoRandomFun::init const TH1 &  histo  )  [protected]
 

Initialization.

Parameters:
histo  The histogram

Definition at line 216 of file RandomFuns.C.

References edges, nbins, and values.

Referenced by HistoRandomFun().


Member Data Documentation

double* HistoRandomFun::values [protected]
 

The bin values

Definition at line 214 of file RandomFuns.h.

Referenced by init(), operator()(), and ~HistoRandomFun().


The documentation for this class was generated from the following files:
Generated on Thu Oct 26 12:54:38 2006 for SFH by doxygen 1.3.2