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

SetOfHistograms Class Reference

#include <SetOfHistograms.h>

Inheritance diagram for SetOfHistograms:

Inheritance graph
[legend]
Collaboration diagram for SetOfHistograms:

Collaboration graph
[legend]
List of all members.

Detailed Description

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

A SetOfHistograms contains a set of 1-dimensional TH1F 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 a BinningFun object that at the same time defines the number of histograms.

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

A SetOfHistograms 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
2006/06/30 11:05:00
Author
blist

Changelog:

Definition at line 58 of file SetOfHistograms.h.

Public Member Functions

 SetOfHistograms (const char *name_, const char *title_, const ROListPoR &hhl, const BinningFunPoR &binning_)
 Constructor for an empty set histograms.

 SetOfHistograms (const char *name_, const char *title_, Int_t nbinsx, Axis_t xlow, Axis_t xup, const ROListPoR &hhl, const BinningFunPoR &binning_)
 Constructor for a set of histograms with equidistant axis binning.

 SetOfHistograms (const char *name_, const char *title_, Int_t nbinsx, const Double_t *xbins, const ROListPoR &hhl, const BinningFunPoR &binning_)
 Constructor for a set of histograms with non-equidistant axis binning, taking doubles.

 SetOfHistograms (const char *name_, const char *title_, Int_t nbinsx, const Float_t *xbins, const ROListPoR &hhl, const BinningFunPoR &binning_)
 Constructor for a set of histograms with non-equidistant axis binning, taking floats.

 SetOfHistograms (const char *name_, const char *title_, const Binning &axisbinning_, const ROListPoR &hhl, const BinningFunPoR &binning_)
 Constructor taking a Binning object.

 SetOfHistograms (const char *name_, const char *title_, TFile &file, const ROListPoR &hhl, const BinningFunPoR &binning_)
 Constructor for a set of histograms to be read from a file.

virtual ~SetOfHistograms ()
 Destructor.

RegH1FgetHisto (IndexType i)
 Returns histogram number i (corresponding to bin i of the BinningFun).

RegH1FgetHisto (iterator i)
 Returns histogram corresponding to an iterator.

const RegH1FgetHisto (const_iterator i) const
 Returns histogram corresponding to an iterator.

RegH1FgetSummary (Option_t *option_, const ROListPoR &hhl)
 Returns a summary histogram,.

RegH1FgetSummary (Option_t *option_, const char *fname, int parnumber, int hnumber, const char *tcomment, const ROListPoR &hhl)
 Returns a summary histogram from fit function parameters.

virtual RegH1FgetSum (const char *name, const char *title, const ROListPoR &hhl, int lowbin=0, int highbin=0) const
 Returns a histogram that is the sum of all histos in the set.

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


Protected Member Functions

void initialize (ROList &hhl)

Protected Attributes

Binning axisbinning
 The axis binning.


Private Member Functions

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

SetOfHistogramsoperator= (const SetOfHistograms &source)
 Private assignment operator, left unimplemented: No assignment!


Constructor & Destructor Documentation

SetOfHistograms::SetOfHistograms const char *  name_,
const char *  title_,
const ROListPoR hhl,
const BinningFunPoR binning_
 

Constructor for an empty set histograms.

Parameters:
name_  Common histogram name
title_  Common histogram title
hhl  ROList object where "this" will be registered
binning_  The BinningFun that assigns entries to histograms

Definition at line 35 of file SetOfHistograms.C.

SetOfHistograms::SetOfHistograms const char *  name_,
const char *  title_,
Int_t  nbinsx,
Axis_t  xlow,
Axis_t  xup,
const ROListPoR hhl,
const BinningFunPoR binning_
 

Constructor for a set of histograms with equidistant axis binning.

Parameters:
name_  Common histogram name
title_  Common histogram title
nbinsx  Number of bins (as for TH1F)
xlow  Lower edge (as for TH1F)
xup  Upper edge (as for TH1F)
hhl  ROList object where "this" will be registered
binning_  The BinningFun that assigns entries to histograms

Definition at line 43 of file SetOfHistograms.C.

References SetOfH::initHistos().

SetOfHistograms::SetOfHistograms const char *  name_,
const char *  title_,
Int_t  nbinsx,
const Double_t *  xbins,
const ROListPoR hhl,
const BinningFunPoR binning_
 

Constructor for a set of histograms with non-equidistant axis binning, taking doubles.

Parameters:
name_  Common histogram name
title_  Common histogram title
nbinsx  Number of bins (as for TH1F)
xbins  Bin edges (as for TH1F)
hhl  ROList object where "this" will be registered
binning_  The BinningFun that assigns entries to histograms

Definition at line 57 of file SetOfHistograms.C.

References SetOfH::initHistos().

SetOfHistograms::SetOfHistograms const char *  name_,
const char *  title_,
Int_t  nbinsx,
const Float_t *  xbins,
const ROListPoR hhl,
const BinningFunPoR binning_
 

Constructor for a set of histograms with non-equidistant axis binning, taking floats.

Parameters:
name_  Common histogram name
title_  Common histogram title
nbinsx  Number of bins (as for TH1F)
xbins  Bin edges (as for TH1F)
hhl  ROList object where "this" will be registered
binning_  The BinningFun that assigns entries to histograms

Definition at line 70 of file SetOfHistograms.C.

References SetOfH::initHistos().

SetOfHistograms::SetOfHistograms const char *  name_,
const char *  title_,
const Binning &  axisbinning_,
const ROListPoR hhl,
const BinningFunPoR binning_
 

Constructor taking a Binning object.

Parameters:
name_  Common histogram name
title_  Common histogram title
axisbinning_  Defines the histogram binning
hhl  ROList object where "this" will be registered
binning_  The BinningFun that assigns entries to histograms

Definition at line 82 of file SetOfHistograms.C.

References SetOfH::initHistos().

SetOfHistograms::SetOfHistograms const char *  name_,
const char *  title_,
TFile &  file,
const ROListPoR hhl,
const BinningFunPoR binning_
 

Constructor for a set of histograms to be read from a file.

Parameters:
name_  Common histogram name
title_  Common histogram title
file  An input root file
hhl  ROList object where "this" will be registered
binning_  The BinningFun that assigns entries to histograms

Definition at line 94 of file SetOfHistograms.C.

References SetOfH::genBinName(), SetOfH::getBinning(), and ROList::IndexType.


Member Function Documentation

RegH1F * SetOfHistograms::getHisto IndexType  i  ) 
 

Returns histogram number i (corresponding to bin i of the BinningFun).

Parameters:
i  The number of the histogram to be returned

Definition at line 122 of file SetOfHistograms.C.

References ROList::getEntry().

Referenced by getSum(), getSummary(), and MatrixOfHistograms::getSummarySet().

RegH1F * SetOfHistograms::getHisto iterator  i  ) 
 

Returns histogram corresponding to an iterator.

Parameters:
i  The iterator

Definition at line 126 of file SetOfHistograms.C.

References ROList::getEntry().

const RegH1F * SetOfHistograms::getHisto const_iterator  i  )  const
 

Returns histogram corresponding to an iterator.

Parameters:
i  The iterator

Definition at line 130 of file SetOfHistograms.C.

References ROList::getEntry().

RegH1F * SetOfHistograms::getSummary Option_t *  option_,
const ROListPoR hhl
 

Returns a summary histogram,.

The histogram contains on the x-axis a bin number and has as contents the contents or the mean of the individula histograms

Parameters:
option_  Option string Possible values:
  • 1: 1-dim summary histo (default)
  • 2: 2-dim histo
  • C: Contents (default) => number 9999
  • M: Mean => number 9998
hhl  List where to register the summary histo

Definition at line 139 of file SetOfHistograms.C.

References SetOfH::getBinning(), RegH1F::getHistInfo(), getHisto(), ROList::getIndex(), SetOfH::getName(), and SetOfH::getTitle().

RegH1F * SetOfHistograms::getSummary Option_t *  option_,
const char *  fname,
int  parnumber,
int  hnumber,
const char *  tcomment,
const ROListPoR hhl
 

Returns a summary histogram from fit function parameters.

The histogram contains on the x-axis a bin number and has as contents the value of a fit function parameter

Parameters:
option_  Option string (at present unused)
fname  The function name
parnumber  The parameter number to extract
hnumber  A nuber to add to the id
tcomment  A comment to add to the title
hhl  List where to register the summary histo

Definition at line 185 of file SetOfHistograms.C.

References SetOfH::getBinning(), getHisto(), ROList::getIndex(), SetOfH::getName(), and SetOfH::getTitle().

RegH1F * SetOfHistograms::getSum const char *  name,
const char *  title,
const ROListPoR hhl,
int  lowbin = 0,
int  highbin = 0
const [virtual]
 

Returns a histogram that is the sum of all histos in the set.

Parameters:
name  Name for the summary histo
title  Title for the summary histo
hhl  List where to register the summary set
lowbin  Optional number of lowest bin to sum
highbin  Optional number of highest bin to sum

Definition at line 227 of file SetOfHistograms.C.

References ROList::getHighestEntry(), getHisto(), and ROList::IndexType.

void SetOfHistograms::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 111 of file SetOfHistograms.C.

References axisbinning, SetOfH::genBinName(), SetOfH::genBinTitle(), and ROList::registerObject().


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