Public Types | Public Member Functions

ForIA::Directory Class Reference

Directory structure for histograms in ROOT files. More...

#include <RootHistogrammer.hh>

List of all members.

Public Types

typedef boost::unordered_map
< string, TH1D * >::iterator 
iterator
 iterator to the 1D histograms in this dir
typedef boost::unordered_map
< string, TH1D * >
::const_iterator 
const_iterator
 const iterator to the 1D histograms in this dir
typedef boost::unordered_map
< string, TH2D * >::iterator 
iterator2D
 iterator to the 2D histograms in this dir
typedef boost::unordered_map
< string, TH2D * >
::const_iterator 
const_iterator2D
 const iterator to the 2D histograms in this dir
typedef boost::unordered_map
< string, TH3D * >::iterator 
iterator3D
 iterator to the 3D histograms in this dir
typedef boost::unordered_map
< string, TH3D * >
::const_iterator 
const_iterator3D
 const iterator to the 3D histograms in this dir

Public Member Functions

 Directory (const string &name)
void addHistogram (const string &name, TH1D *histo, bool divideBinWidths)
 Add a 1D histogram to this directory.
void addProfile (const string &name, TProfile *prof)
 Add a 1D profile to this directory.
void addHistogram (const string &name, TH2D *histo, bool divideBinWidths)
 Add a 2D histogram to this directory.
void addHistogram (const string &name, TH3D *histo, bool divideBinWidths)
 Add a 3D histogram to this directory.
TH1D * histogram (const string &name)
 Attempt to find a 1D histogram by its name in a directory.
TProfile * profile (const string &name)
 Attempt to find a 1D profile by its name in a directory.
TH2D * histogram2D (const string &name)
 Attempt to find a 2D histogram by its name in a directory.
TH3D * histogram3D (const string &name)
 Attempt to find a 3D histogram by its name in a directory.
pair< string, Directory * > addDirectory (string path)
const string & name () const
 The name of this directory.
bool write (TDirectory *dir) const
 Write this directory and its contents to ROOT file.
iterator begin ()
 iterator to the start of the 1D histograms in this dir
iterator end ()
 iterator to the end of the 1D histograms in this dir
iterator2D begin2D ()
 iterator to the start of the 2D histograms in this dir
iterator2D end2D ()
 iterator to the end of the 2D histograms in this dir
iterator3D begin3D ()
 iterator to the start of the 3D histograms in this dir
iterator3D end3D ()
 iterator to the end of the 2D histograms in this dir
bool doDivideBinWidths (const TH1 *histo) const

Detailed Description

Directory structure for histograms in ROOT files.

Definition at line 40 of file RootHistogrammer.hh.


Member Typedef Documentation

typedef boost::unordered_map<string, TH1D*>::const_iterator ForIA::Directory::const_iterator

const iterator to the 1D histograms in this dir

Definition at line 84 of file RootHistogrammer.hh.

typedef boost::unordered_map<string, TH2D*>::const_iterator ForIA::Directory::const_iterator2D

const iterator to the 2D histograms in this dir

Definition at line 94 of file RootHistogrammer.hh.

typedef boost::unordered_map<string, TH3D*>::const_iterator ForIA::Directory::const_iterator3D

const iterator to the 3D histograms in this dir

Definition at line 104 of file RootHistogrammer.hh.

typedef boost::unordered_map<string, TH1D*>::iterator ForIA::Directory::iterator

iterator to the 1D histograms in this dir

Definition at line 82 of file RootHistogrammer.hh.

typedef boost::unordered_map<string, TH2D*>::iterator ForIA::Directory::iterator2D

iterator to the 2D histograms in this dir

Definition at line 89 of file RootHistogrammer.hh.

typedef boost::unordered_map<string, TH3D*>::iterator ForIA::Directory::iterator3D

iterator to the 3D histograms in this dir

Definition at line 102 of file RootHistogrammer.hh.


Constructor & Destructor Documentation

ForIA::Directory::Directory ( const string &  name )

Definition at line 417 of file RootHistogrammer.cxx.


Member Function Documentation

pair< string, Directory * > ForIA::Directory::addDirectory ( string  path )

Add a new directory (if it doesn't already exist) at a location relative to this directory. Typically you would call this on the lowest directory "/" analogously to mkdir -p

Parameters:
paththe path to be created (if not there)
Returns:
std::pair<string, Directory*> of the directory path and pointer to the dir

Definition at line 428 of file RootHistogrammer.cxx.

void ForIA::Directory::addHistogram ( const string &  name,
TH1D *  histo,
bool  divideBinWidths 
)

Add a 1D histogram to this directory.

Definition at line 477 of file RootHistogrammer.cxx.

void ForIA::Directory::addHistogram ( const string &  name,
TH3D *  histo,
bool  divideBinWidths 
)

Add a 3D histogram to this directory.

Definition at line 513 of file RootHistogrammer.cxx.

void ForIA::Directory::addHistogram ( const string &  name,
TH2D *  histo,
bool  divideBinWidths 
)

Add a 2D histogram to this directory.

Definition at line 500 of file RootHistogrammer.cxx.

void ForIA::Directory::addProfile ( const string &  name,
TProfile *  prof 
)

Add a 1D profile to this directory.

Definition at line 491 of file RootHistogrammer.cxx.

iterator ForIA::Directory::begin (  ) [inline]

iterator to the start of the 1D histograms in this dir

Definition at line 87 of file RootHistogrammer.hh.

iterator2D ForIA::Directory::begin2D (  ) [inline]

iterator to the start of the 2D histograms in this dir

Definition at line 97 of file RootHistogrammer.hh.

iterator3D ForIA::Directory::begin3D (  ) [inline]

iterator to the start of the 3D histograms in this dir

Definition at line 107 of file RootHistogrammer.hh.

bool ForIA::Directory::doDivideBinWidths ( const TH1 *  histo ) const

Definition at line 546 of file RootHistogrammer.cxx.

iterator ForIA::Directory::end (  ) [inline]

iterator to the end of the 1D histograms in this dir

Definition at line 89 of file RootHistogrammer.hh.

iterator2D ForIA::Directory::end2D (  ) [inline]

iterator to the end of the 2D histograms in this dir

Definition at line 99 of file RootHistogrammer.hh.

iterator3D ForIA::Directory::end3D (  ) [inline]

iterator to the end of the 2D histograms in this dir

Definition at line 109 of file RootHistogrammer.hh.

TH1D * ForIA::Directory::histogram ( const string &  name )

Attempt to find a 1D histogram by its name in a directory.

Definition at line 526 of file RootHistogrammer.cxx.

TH2D * ForIA::Directory::histogram2D ( const string &  name )

Attempt to find a 2D histogram by its name in a directory.

Definition at line 536 of file RootHistogrammer.cxx.

TH3D * ForIA::Directory::histogram3D ( const string &  name )

Attempt to find a 3D histogram by its name in a directory.

Definition at line 541 of file RootHistogrammer.cxx.

const string & ForIA::Directory::name (  ) const

The name of this directory.

Definition at line 423 of file RootHistogrammer.cxx.

TProfile * ForIA::Directory::profile ( const string &  name )

Attempt to find a 1D profile by its name in a directory.

Definition at line 531 of file RootHistogrammer.cxx.

bool ForIA::Directory::write ( TDirectory *  dir ) const

Write this directory and its contents to ROOT file.

Definition at line 554 of file RootHistogrammer.cxx.


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