RAIDA  1.9.0
Public Member Functions | List of all members
AIDA::ICloud1DROOT Class Reference

User level interface to a 1D Cloud. More...

#include <ICloud1DROOT.h>

Inheritance diagram for AIDA::ICloud1DROOT:
AIDA::ICloud1D AIDA::ICloud AIDA::IBaseHistogram

Public Member Functions

virtual ~ICloud1DROOT ()
 Destructor.
 
 ICloud1DROOT (const std::string &path, const std::string &title, int nMax, ITree *usedTree, const std::string &options="")
 Constructor.
 
 ICloud1DROOT (const std::string &path, ITree *usedTree, const ICloud1DROOT &cloud)
 
virtual bool fill (double x, double weight=1.)
 Fill the ICloud1D with a value and a corresponding weight. More...
 
virtual double lowerEdge () const
 Get the lower edge of the ICloud1D. More...
 
virtual double upperEdge () const
 Get the upper edge of the ICloud1D. More...
 
virtual double value (int index) const
 Get the value corresponding to a given entry. More...
 
virtual double weight (int index) const
 Get the weight corresponding to a given entry. More...
 
virtual double mean () const
 Get the mean of the ICloud1D. More...
 
virtual double rms () const
 Get the RMS of the ICloud1D. More...
 
virtual bool myConvert (int nBins, double lowerEdge, double upperEdge) const
 Convert internally the ICloud1D to an IHistogram1D with given number of bins, upper edge and lower edge. More...
 
virtual bool convert (int nBins, double lowerEdge, double upperEdge)
 Convert internally the ICloud1D to an IHistogram1D with given number of bins, upper edge and lower edge. More...
 
virtual const IHistogram1Dhistogram () const
 Convert internally the ICloud1D to an IHistogram1D with given bin edges. More...
 
virtual bool fillHistogram (IHistogram1D &hist) const
 Project the ICloud1D on an IHistogram1D. More...
 
virtual double sumOfWeights () const
 Get the sum of weights of all the entries. More...
 
virtual bool myConvertToHistogram () const
 Convert the ICloud to an IHistogram using the default number of bins. More...
 
virtual bool convertToHistogram ()
 Convert the ICloud to an IHistogram using the default number of bins. More...
 
virtual bool isConverted () const
 Check if the ICloud has been converted to an IHistogram. More...
 
virtual int maxEntries () const
 Get the number of entries after which the cloud will be converted to an IHistogram. More...
 
virtual bool scale (double scaleFactor)
 Scale the weights by a given factor. More...
 
virtual std::string title () const
 Get the Histogram's title. More...
 
virtual bool setTitle (const std::string &title)
 Set the histogram title. More...
 
virtual int dimension () const
 Get the IAnnotation associated with the Histogram. More...
 
virtual bool reset ()
 Reset the Histogram; as if just created. More...
 
virtual int entries () const
 Get the number of in-range entries in the Histogram. More...
 
- Public Member Functions inherited from AIDA::ICloud1D
virtual ~ICloud1D ()
 Destructor.
 
- Public Member Functions inherited from AIDA::ICloud
virtual ~ICloud ()
 Destructor.
 
- Public Member Functions inherited from AIDA::IBaseHistogram
virtual ~IBaseHistogram ()
 Destructor.
 

Detailed Description

User level interface to a 1D Cloud.

Author
T. Kraemer, DESY
Version
Id:
ICloud1DROOT.h,v 1.3 2006-12-04 17:24:06 tkraemer Exp

Member Function Documentation

bool ICloud1DROOT::convert ( int  nBins,
double  lowerEdge,
double  upperEdge 
)
virtual

Convert internally the ICloud1D to an IHistogram1D with given number of bins, upper edge and lower edge.

Parameters
nBinsThe number of bins.
lowerEdgeThe lower edge.
upperEdgeThe upper edge.
Returns
false If the ICloud1D has already been converted.

Implements AIDA::ICloud1D.

References myConvert().

Referenced by fill().

bool ICloud1DROOT::convertToHistogram ( )
virtual

Convert the ICloud to an IHistogram using the default number of bins.

Returns
false If the ICloud has already been converted.

Implements AIDA::ICloud.

References myConvertToHistogram().

int ICloud1DROOT::dimension ( ) const
virtual

Get the IAnnotation associated with the Histogram.

Returns
The IAnnotation.virtual IAnnotation & annotation() ; virtual const IAnnotation & annotation() const ; Get the Histogram's dimension.
The Histogram's dimension.

Implements AIDA::IBaseHistogram.

int ICloud1DROOT::entries ( ) const
virtual

Get the number of in-range entries in the Histogram.

Returns
The number of in-range entries.

Implements AIDA::IBaseHistogram.

References AIDA::IBaseHistogram::entries().

bool ICloud1DROOT::fill ( double  x,
double  weight = 1. 
)
virtual

Fill the ICloud1D with a value and a corresponding weight.

Parameters
xThe value.
weightThe corresponding weight. By default it is 1.
Returns
false If the ICloud1D is full, if the weight's value is is not between 0 and 1.

Implements AIDA::ICloud1D.

References convert(), AIDA::IHistogram1D::fill(), and weight().

bool ICloud1DROOT::fillHistogram ( IHistogram1D hist) const
virtual

Project the ICloud1D on an IHistogram1D.

Parameters
histThe IHistogram1D to be filled.
Returns
false If the ICloud1D is already converted.

Implements AIDA::ICloud1D.

References AIDA::IHistogram1D::fill(), and weight().

const IHistogram1D & ICloud1DROOT::histogram ( ) const
virtual

Convert internally the ICloud1D to an IHistogram1D with given bin edges.

Parameters
binEdgesThe bins edges.
Returns
false If the ICloud1D has already been converted.virtual bool convert(const std::vector<double> & binEdges) ; Get the internal IHistogram1D in which the ICloud1D converted to.
The histogram. or because of a convert() method invocation.

Implements AIDA::ICloud1D.

References myConvertToHistogram().

bool ICloud1DROOT::isConverted ( ) const
virtual

Check if the ICloud has been converted to an IHistogram.

Returns
true if it has been converted.

Implements AIDA::ICloud.

double ICloud1DROOT::lowerEdge ( ) const
virtual

Get the lower edge of the ICloud1D.

Returns
The lower edge.

Implements AIDA::ICloud1D.

Referenced by myConvert().

int ICloud1DROOT::maxEntries ( ) const
virtual

Get the number of entries after which the cloud will be converted to an IHistogram.

Returns
The number of entries.

Implements AIDA::ICloud.

double ICloud1DROOT::mean ( ) const
virtual

Get the mean of the ICloud1D.

Returns
The mean.

Implements AIDA::ICloud1D.

References AIDA::IHistogram1D::mean().

Referenced by rms().

bool ICloud1DROOT::myConvert ( int  nBins,
double  lowerEdge,
double  upperEdge 
) const
virtual

Convert internally the ICloud1D to an IHistogram1D with given number of bins, upper edge and lower edge.

Parameters
nBinsThe number of bins.
lowerEdgeThe lower edge.
upperEdgeThe upper edge.
Returns
false If the ICloud1D has already been converted.

References AIDA::ITree::cd(), AIDA::IHistogram1D::fill(), lowerEdge(), AIDA::ITree::pwd(), title(), and weight().

Referenced by convert(), and myConvertToHistogram().

bool ICloud1DROOT::myConvertToHistogram ( ) const
virtual

Convert the ICloud to an IHistogram using the default number of bins.

Returns
false If the ICloud has already been converted.

References myConvert().

Referenced by convertToHistogram(), and histogram().

bool ICloud1DROOT::reset ( )
virtual

Reset the Histogram; as if just created.

Returns
false If something goes wrong.

Implements AIDA::IBaseHistogram.

double ICloud1DROOT::rms ( ) const
virtual

Get the RMS of the ICloud1D.

Returns
The RMS.

Implements AIDA::ICloud1D.

References mean(), and AIDA::IHistogram1D::rms().

bool ICloud1DROOT::scale ( double  scaleFactor)
virtual

Scale the weights by a given factor.

Parameters
scaleFactorThe scale factor.
Returns
false If a non-positive scale factor is provided.

Implements AIDA::ICloud.

References AIDA::ITree::cd(), AIDA::ITree::pwd(), AIDA::IHistogram::scale(), title(), and weight().

bool ICloud1DROOT::setTitle ( const std::string &  title)
virtual

Set the histogram title.

Parameters
titleThe title.
Returns
false If title cannot be changed.

Implements AIDA::IBaseHistogram.

References AIDA::IBaseHistogram::setTitle().

double ICloud1DROOT::sumOfWeights ( ) const
virtual

Get the sum of weights of all the entries.

Returns
The sum of the weights of all the entries.

Implements AIDA::ICloud.

References AIDA::IHistogram::sumAllBinHeights(), and weight().

std::string ICloud1DROOT::title ( ) const
virtual

Get the Histogram's title.

Returns
The Histogram's title.

Implements AIDA::IBaseHistogram.

References AIDA::IBaseHistogram::title().

Referenced by myConvert(), and scale().

double ICloud1DROOT::upperEdge ( ) const
virtual

Get the upper edge of the ICloud1D.

Returns
The upper edge.

Implements AIDA::ICloud1D.

double ICloud1DROOT::value ( int  index) const
virtual

Get the value corresponding to a given entry.

Parameters
indexThe entry's index.
Returns
The value of the index-th entry. If the ICloud1D has already been converted, 0 is returned.

Implements AIDA::ICloud1D.

double ICloud1DROOT::weight ( int  index) const
virtual

Get the weight corresponding to a given entry.

Parameters
indexThe entry's index.
Returns
The weight of the index-th entry. If the ICloud1D has already been converted, 0 is returned.

Implements AIDA::ICloud1D.

Referenced by fill(), fillHistogram(), myConvert(), scale(), and sumOfWeights().


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