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

MatrixOfH Class Reference

#include <MatrixOfH.h>

Inheritance diagram for MatrixOfH:

Inheritance graph
[legend]
Collaboration diagram for MatrixOfH:

Collaboration graph
[legend]
List of all members.

Detailed Description

A 2-dimensional collection of 1-dimensional histograms that have the same axis.

A MatrixOfH contains a set of TH1 histograms; these histograms are (normally) all created by the constructor. The histograms share the same axis binning, and their names and titles are created using two BinningFun objects that at the same time define the number of histograms.

The histogram names will a concatenation of the name given by the user, and the bin names given by the BinningFun objects. The same applies to the title.

A MatrixOfH is a convenient tool to create a large set of histograms at the same time.

Functions exist to add, multiply, and divide sets of histograms. These operations are performed on pairs of corresponding histograms, if possible.

Author: Jenny Böhme, Benno List

Date
2005/11/26 13:51:01
Author
blist

Changelog:

Definition at line 51 of file MatrixOfH.h.

Public Member Functions

 MatrixOfH (const char *name_, const char *title_, const ROListPoR &rol, const BinningFunPoR &binning1_, const BinningFunPoR &binning2_, Option_t *option_=0)
 Constructor for an empty set of histograms.

virtual ~MatrixOfH ()
 Virtual destructor.

TH1 * getHisto (IndexType i, IndexType j)
const char * genBinTitle (IndexType i, IndexType j) const
 Generate a bin title. Delete the returned string!

const char * genBinName (IndexType i, IndexType j) const
 Generate a bin name. Delete the returned string!

virtual void initHisto (IndexType i)
 Books and registers one histogram with number i.

virtual void initHisto (IndexType i, IndexType j)=0
 Books and registers one histogram with number i.


Protected Member Functions

virtual void initHistos ()
 Book all the histos , generate their names and titles.

IndexType getBinNumber (IndexType i, IndexType j) const
 Get bin number for given bins in dimensions 1 and 2.


Private Member Functions

 MatrixOfH (const MatrixOfH &source)
 Private copy constructor, left unimplemented: No copying!

MatrixOfHoperator= (const MatrixOfH &source)
 Private assignment, left unimplemented: No assignment!


Private Attributes

IndexType nbins2
 The maximal number of bins of the 2nd Dimension.


Constructor & Destructor Documentation

MatrixOfH::MatrixOfH const char *  name_,
const char *  title_,
const ROListPoR rol,
const BinningFunPoR binning1_,
const BinningFunPoR binning2_,
Option_t *  option_ = 0
 

Constructor for an empty set of histograms.

Parameters:
name_  Common histogram name
title_  Common histogram title
rol  ROList object where "this" will be registered
binning1_  The 1st BinningFun that assigns entries to histograms
binning2_  The 2nd BinningFun that assigns entries to histograms
option_  An optional option.

Definition at line 31 of file MatrixOfH.C.

References SetOfH::getBinning(), BinningFun::getMaxBins(), and nbins2.

MatrixOfH::MatrixOfH const MatrixOfH source  )  [private]
 

Private copy constructor, left unimplemented: No copying!

Parameters:
source  The source Matrix


Member Function Documentation

TH1 * MatrixOfH::getHisto IndexType  i,
IndexType  j
 

Returns a pointer to the histogram corresponding to bin i of the 1st and bin j of the 2nd binning

Parameters:
i  Bin number of 1st binning
j  Bin number of 2nd binning

Reimplemented in MatrixOfH2F, MatrixOfHistograms, and MatrixOfHProf.

Definition at line 47 of file MatrixOfH.C.

References getBinNumber(), and ROList::getEntry().

const char * MatrixOfH::genBinTitle IndexType  i,
IndexType  j
const
 

Generate a bin title. Delete the returned string!

Parameters:
i  Bin of 1st dimension
j  Bin of 2nd dimension

Definition at line 73 of file MatrixOfH.C.

References SetOfH::getBinning(), BinningFun::getBinTitle(), and SetOfH::getTitle().

Referenced by MatrixOfHProf::initHisto(), MatrixOfHistograms::initHisto(), and MatrixOfH2F::initHisto().

const char * MatrixOfH::genBinName IndexType  i,
IndexType  j
const
 

Generate a bin name. Delete the returned string!

Parameters:
i  Bin of 1st dimension
j  Bin of 2nd dimension

Definition at line 102 of file MatrixOfH.C.

References BinningFun::getBinName(), SetOfH::getBinning(), and SetOfH::getName().

Referenced by MatrixOfHProf::initHisto(), MatrixOfHistograms::initHisto(), MatrixOfH2F::initHisto(), and MatrixOfHistograms::MatrixOfHistograms().

void MatrixOfH::initHisto IndexType  i  )  [virtual]
 

Books and registers one histogram with number i.

Parameters:
i  The number under which to register

Implements SetOfH.

Definition at line 43 of file MatrixOfH.C.

Referenced by initHistos().

virtual void MatrixOfH::initHisto IndexType  i,
IndexType  j
[pure virtual]
 

Books and registers one histogram with number i.

Parameters:
i  Bin of 1st dimension
j  Bin of 2nd dimension

Implemented in MatrixOfH2F, MatrixOfHistograms, and MatrixOfHProf.

MatrixOfH::IndexType MatrixOfH::getBinNumber IndexType  i,
IndexType  j
const [inline, protected]
 

Get bin number for given bins in dimensions 1 and 2.

Parameters:
i  Bin of 1st dimension
j  Bin of 2nd dimension

Definition at line 110 of file MatrixOfH.h.

References ROList::IndexType, and nbins2.

Referenced by SFMatrixOfHProf::Fill(), SFMatrixOfHistograms::Fill(), SFMatrixOfH2F::Fill(), MatrixOfHProf::getHisto(), MatrixOfHistograms::getHisto(), MatrixOfH2F::getHisto(), getHisto(), MatrixOfHProf::initHisto(), MatrixOfHistograms::initHisto(), and MatrixOfH2F::initHisto().

MatrixOfH& MatrixOfH::operator= const MatrixOfH source  )  [private]
 

Private assignment, left unimplemented: No assignment!

Parameters:
source  The source Matrix


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