Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Histogram Class Reference

#include <Histogram.h>

Inheritance diagram for Histogram:

SampleStatistic RebinHist List of all members.

Public Types

typedef std::vector<float>::const_iterator const_iterator

Public Methods

 Histogram (std::string title="default", double from=0, double to=1, double step=0.1)
 ~Histogram ()
void fill (double x, double w=1.0)
void operator+= (double x)
virtual void clear ()
void setRange (double from=0, double to=1, double step=0.1)
void print (std::ostream& out=std::cout)
float operator[] (int n) const
float step () const
float to () const
float from () const
float total () const
float under () const
float over () const
const_iterator begin () const
const_iterator end () const
Histogram* next ()
void setTitle ( std::string& s )

Private Attributes

std::string m_title
double m_from
double m_to
double m_step
unsigned m_bins
std::vector<float> m_hist
double m_total
double m_under
double m_over
Histogram* m_next

Member Typedef Documentation

typedef std::vector<float>::const_iterator Histogram::const_iterator
 

Definition at line 47 of file Histogram.h.


Constructor & Destructor Documentation

Histogram::Histogram ( std::string title = "default",
double from = 0,
double to = 1,
double step = 0.1 )
 

Definition at line 17 of file Histogram.cxx.

Histogram::~Histogram ( )
 

Definition at line 70 of file Histogram.cxx.


Member Function Documentation

const_iterator Histogram::begin ( ) const [inline]
 

Definition at line 48 of file Histogram.h.

void Histogram::clear ( ) [virtual]
 

Definition at line 73 of file Histogram.cxx.

Referenced by clearAllHists(), and setRange().

const_iterator Histogram::end ( ) const [inline]
 

Definition at line 49 of file Histogram.h.

void Histogram::fill ( double x,
double w = 1.0 )
 

Definition at line 88 of file Histogram.cxx.

Referenced by RebinHist::fill(), operator+=(), and RebinHist::rebin().

float Histogram::from ( ) const [inline]
 

Definition at line 39 of file Histogram.h.

Histogram * Histogram::next ( ) [inline]
 

Definition at line 51 of file Histogram.h.

Referenced by clearAllHists(), and printAllHists().

void Histogram::operator+= ( double x ) [inline, virtual]
 

Reimplemented from SampleStatistic.

Definition at line 23 of file Histogram.h.

float Histogram::operator[] ( int n ) const [inline]
 

Definition at line 34 of file Histogram.h.

float Histogram::over ( ) const [inline]
 

Definition at line 44 of file Histogram.h.

Referenced by print().

void Histogram::print ( std::ostream & cout = std::cout )
 

Definition at line 98 of file Histogram.cxx.

Referenced by printAllHists().

void Histogram::setRange ( double from = 0,
double to = 1,
double step = 0.1 )
 

Definition at line 38 of file Histogram.cxx.

Referenced by Histogram(), and RebinHist::rebin().

void Histogram::setTitle ( std::string & s ) [inline]
 

Definition at line 53 of file Histogram.h.

float Histogram::step ( ) const [inline]
 

Definition at line 37 of file Histogram.h.

float Histogram::to ( ) const [inline]
 

Definition at line 38 of file Histogram.h.

float Histogram::total ( ) const [inline]
 

Definition at line 42 of file Histogram.h.

Referenced by print().

float Histogram::under ( ) const [inline]
 

Definition at line 43 of file Histogram.h.

Referenced by print().


Member Data Documentation

unsigned Histogram::m_bins [private]
 

Definition at line 59 of file Histogram.h.

double Histogram::m_from [private]
 

Definition at line 58 of file Histogram.h.

std::vector< float > Histogram::m_hist [private]
 

Definition at line 60 of file Histogram.h.

Histogram * Histogram::m_next [private]
 

Definition at line 63 of file Histogram.h.

double Histogram::m_over [private]
 

Definition at line 61 of file Histogram.h.

double Histogram::m_step [private]
 

Definition at line 58 of file Histogram.h.

std::string Histogram::m_title [private]
 

Definition at line 57 of file Histogram.h.

double Histogram::m_to [private]
 

Definition at line 58 of file Histogram.h.

double Histogram::m_total [private]
 

Definition at line 61 of file Histogram.h.

double Histogram::m_under [private]
 

Definition at line 61 of file Histogram.h.


The documentation for this class was generated from the following files:
Generated at Wed Nov 21 12:20:53 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000