ThePEG
2.2.1
|
User level interface for factory classes of Histograms (binned, unbinned, and profile). More...
#include <HistogramFactory.h>
Public Member Functions | |
HistogramFactory (Tree &t) | |
Standard constructor. | |
virtual | ~HistogramFactory () |
Destructor. | |
bool | destroy (IBaseHistogram *hist) |
Destroy an IBaseHistogram object. More... | |
ICloud1D * | createCloud1D (const std::string &, const std::string &, int=-1, const std::string &="") |
LWH cannot create a ICloud1D, an unbinned 1-dimensional histogram. | |
ICloud1D * | createCloud1D (const std::string &) |
LWH cannot create a ICloud1D, an unbinned 1-dimensional histogram. | |
ICloud1D * | createCopy (const std::string &, const ICloud1D &) |
LWH cannot create a copy of an ICloud1D. | |
ICloud2D * | createCloud2D (const std::string &, const std::string &, int=-1, const std::string &="") |
LWH cannot create a ICloud2D, an unbinned 2-dimensional histogram. | |
ICloud2D * | createCloud2D (const std::string &) |
LWH cannot create a ICloud2D, an unbinned 2-dimensional histogram. | |
ICloud2D * | createCopy (const std::string &, const ICloud2D &) |
LWH cannot create a copy of an ICloud2D. | |
ICloud3D * | createCloud3D (const std::string &, const std::string &, int=-1, const std::string &="") |
LWH cannot create a ICloud3D, an unbinned 3-dimensional histogram. | |
ICloud3D * | createCloud3D (const std::string &) |
LWH cannot create a ICloud3D, an unbinned 3-dimensional histogram. | |
ICloud3D * | createCopy (const std::string &, const ICloud3D &) |
LWH cannot create a copy of an ICloud3D. | |
IHistogram1D * | createHistogram1D (const std::string &path, const std::string &title, int nBins, double lowerEdge, double upperEdge, const std::string &="") |
Create a IHistogram1D. More... | |
IHistogram1D * | createHistogram1D (const std::string &pathAndTitle, int nBins, double lowerEdge, double upperEdge) |
Create a IHistogram1D. More... | |
IHistogram1D * | createHistogram1D (const std::string &path, const std::string &title, const std::vector< double > &binEdges, const std::string &="") |
Create a IHistogram1D. More... | |
IHistogram1D * | createCopy (const std::string &path, const IHistogram1D &hist) |
Create a copy of an IHistogram1D. More... | |
IHistogram2D * | createHistogram2D (const std::string &path, const std::string &title, int nx, double xlo, double xup, int ny, double ylo, double yup, const std::string &="") |
Create a IHistogram2D. | |
IHistogram2D * | createHistogram2D (const std::string &pathAndTitle, int nx, double xlo, double xup, int ny, double ylo, double yup) |
Create a IHistogram2D. | |
IHistogram2D * | createHistogram2D (const std::string &path, const std::string &title, const std::vector< double > &xedges, const std::vector< double > &yedges, const std::string &="") |
Create a IHistogram2D. | |
IHistogram2D * | createCopy (const std::string &path, const IHistogram2D &hist) |
Create a copy of an IHistogram2D. | |
IHistogram3D * | createHistogram3D (const std::string &, const std::string &, int, double, double, int, double, double, int, double, double, const std::string &="") |
LWH cannot create a IHistogram3D. | |
IHistogram3D * | createHistogram3D (const std::string &, int, double, double, int, double, double, int, double, double) |
LWH cannot create a IHistogram3D. | |
IHistogram3D * | createHistogram3D (const std::string &, const std::string &, const std::vector< double > &, const std::vector< double > &, const std::vector< double > &, const std::string &="") |
LWH cannot create a IHistogram3D. | |
IHistogram3D * | createCopy (const std::string &, const IHistogram3D &) |
LWH cannot create a copy of an IHistogram3D. | |
IProfile1D * | createProfile1D (const std::string &, const std::string &, int, double, double, const std::string &="") |
LWH cannot create a IProfile1D. | |
IProfile1D * | createProfile1D (const std::string &, const std::string &, int, double, double, double, double, const std::string &="") |
LWH cannot create a IProfile1D. | |
IProfile1D * | createProfile1D (const std::string &, const std::string &, const std::vector< double > &, const std::string &="") |
LWH cannot create a IProfile1D. | |
IProfile1D * | createProfile1D (const std::string &, const std::string &, const std::vector< double > &, double, double, const std::string &="") |
LWH cannot create a IProfile1D. | |
IProfile1D * | createProfile1D (const std::string &, int, double, double) |
LWH cannot create a IProfile1D. | |
IProfile1D * | createProfile1D (const std::string &, int, double, double, double, double) |
LWH cannot create a IProfile1D. | |
IProfile1D * | createCopy (const std::string &, const IProfile1D &) |
LWH cannot create a copy of an IProfile1D. | |
IProfile2D * | createProfile2D (const std::string &, const std::string &, int, double, double, int, double, double, const std::string &="") |
LWH cannot create a IProfile2D. | |
IProfile2D * | createProfile2D (const std::string &, const std::string &, int, double, double, int, double, double, double, double, const std::string &="") |
LWH cannot create a IProfile2D. | |
IProfile2D * | createProfile2D (const std::string &, const std::string &, const std::vector< double > &, const std::vector< double > &, const std::string &="") |
LWH cannot create a IProfile2D. | |
IProfile2D * | createProfile2D (const std::string &, const std::string &, const std::vector< double > &, const std::vector< double > &, double, double, const std::string &="") |
LWH cannot create a IProfile2D. | |
IProfile2D * | createProfile2D (const std::string &, int, double, double, int, double, double) |
LWH cannot create a IProfile2D. | |
IProfile2D * | createProfile2D (const std::string &, int, double, double, int, double, double, double, double) |
LWH cannot create a IProfile2D. | |
IProfile2D * | createCopy (const std::string &, const IProfile2D &) |
LWH cannot create a copy of an IProfile2D. | |
Histogram1D * | add (const std::string &path, const Histogram1D &hist1, const Histogram1D &hist2) |
Create a Histogram1D by adding two Histogram1D. More... | |
IHistogram1D * | add (const std::string &path, const IHistogram1D &hist1, const IHistogram1D &hist2) |
Create an IHistogram1D by adding two IHistogram1D. More... | |
Histogram1D * | subtract (const std::string &path, const Histogram1D &h1, const Histogram1D &h2) |
Create a Histogram1D by subtracting two Histogram1D. More... | |
IHistogram1D * | subtract (const std::string &path, const IHistogram1D &hist1, const IHistogram1D &hist2) |
Create an IHistogram1D by subtracting two IHistogram1D. More... | |
Histogram1D * | multiply (const std::string &path, const Histogram1D &h1, const Histogram1D &h2) |
Create a Histogram1D by multiplying two Histogram1D. More... | |
IHistogram1D * | multiply (const std::string &path, const IHistogram1D &hist1, const IHistogram1D &hist2) |
Create an IHistogram1D by multiplying two IHistogram1D. More... | |
Histogram1D * | divide (const std::string &path, const Histogram1D &h1, const Histogram1D &h2) |
Create n Histogram1D by dividing two Histogram1D. More... | |
IHistogram1D * | divide (const std::string &path, const IHistogram1D &hist1, const IHistogram1D &hist2) |
Create an IHistogram1D by dividing two IHistogram1D. More... | |
bool | _neq (double a, double b, double eps=1e-5) const |
bool | checkBins (const Histogram1D &h1, const Histogram1D &h2) const |
Check if two histograms have the same bins. | |
bool | checkBins (const Histogram2D &h1, const Histogram2D &h2) const |
Check if two histograms have the same bins. | |
IHistogram2D * | add (const std::string &path, const IHistogram2D &hist1, const IHistogram2D &hist2) |
LWH cannot create an IHistogram2D by adding two IHistogram2D. | |
Histogram2D * | add (const std::string &path, const Histogram2D &h1, const Histogram2D &h2) |
LWH cannot create an IHistogram2D by adding two IHistogram2D. | |
Histogram2D * | subtract (const std::string &path, const Histogram2D &h1, const Histogram2D &h2) |
LWH cannot create an IHistogram2D by subtracting two IHistogram2D. | |
IHistogram2D * | subtract (const std::string &path, const IHistogram2D &h1, const IHistogram2D &h2) |
LWH cannot create an IHistogram2D by subtracting two IHistogram2D. | |
IHistogram2D * | multiply (const std::string &path, const IHistogram2D &h1, const IHistogram2D &h2) |
LWH cannot create an IHistogram2D by multiplying two IHistogram2D. | |
Histogram2D * | multiply (const std::string &path, const Histogram2D &h1, const Histogram2D &h2) |
LWH cannot create an IHistogram2D by multiplying two IHistogram2D. | |
Histogram2D * | divide (const std::string &path, const Histogram2D &h1, const Histogram2D &h2) |
LWH cannot create an IHistogram2D by dividing two IHistogram2D. | |
IHistogram2D * | divide (const std::string &path, const IHistogram2D &h1, const IHistogram2D &h2) |
LWH cannot create an IHistogram2D by dividing two IHistogram2D. | |
IHistogram3D * | add (const std::string &, const IHistogram3D &, const IHistogram3D &) |
LWH cannot create an IHistogram3D by adding two IHistogram3D. | |
IHistogram3D * | subtract (const std::string &, const IHistogram3D &, const IHistogram3D &) |
LWH cannot create an IHistogram3D by subtracting two IHistogram3D. | |
IHistogram3D * | multiply (const std::string &, const IHistogram3D &, const IHistogram3D &) |
LWH cannot create an IHistogram3D by multiplying two IHistogram3D. | |
IHistogram3D * | divide (const std::string &, const IHistogram3D &, const IHistogram3D &) |
LWH cannot create an IHistogram3D by dividing two IHistogram3D. | |
IHistogram1D * | projectionX (const std::string &path, const IHistogram2D &h) |
LWH cannot create an IHistogram1D by projecting an IHistogram2D along its x axis. | |
Histogram1D * | projectionX (const std::string &path, const Histogram2D &h) |
LWH cannot create an IHistogram1D by projecting an IHistogram2D along its x axis. | |
IHistogram1D * | projectionY (const std::string &path, const IHistogram2D &h) |
LWH cannot create an IHistogram1D by projecting an IHistogram2D along its y axis. | |
Histogram1D * | projectionY (const std::string &path, const Histogram2D &h) |
LWH cannot create an IHistogram1D by projecting an IHistogram2D along its y axis. | |
IHistogram1D * | sliceX (const std::string &path, const IHistogram2D &h, int i) |
LWH cannot create an IHistogram1D by slicing an IHistogram2D parallel to the y axis at a given bin. | |
Histogram1D * | sliceX (const std::string &path, const Histogram2D &h, int i) |
LWH cannot create an IHistogram1D by slicing an IHistogram2D parallel to the y axis at a given bin. | |
IHistogram1D * | sliceY (const std::string &path, const IHistogram2D &h, int i) |
LWH cannot create an IHistogram1D by slicing an IHistogram2D parallel to the x axis at a given bin. | |
Histogram1D * | sliceY (const std::string &path, const Histogram2D &h, int i) |
LWH cannot create an IHistogram1D by slicing an IHistogram2D parallel to the x axis at a given bin. | |
IHistogram1D * | sliceX (const std::string &path, const IHistogram2D &h, int il, int iu) |
LWH cannot create an IHistogram1D by slicing an IHistogram2D parallel to the y axis between two bins (inclusive). | |
Histogram1D * | sliceX (const std::string &path, const Histogram2D &h2, int il, int iu) |
LWH cannot create an IHistogram1D by slicing an IHistogram2D parallel to the y axis between two bins (inclusive). | |
IHistogram1D * | sliceY (const std::string &path, const IHistogram2D &h, int il, int iu) |
LWH cannot create an IHistogram1D by slicing an IHistogram2D parallel to the x axis between two bins (inclusive). | |
Histogram1D * | sliceY (const std::string &path, const Histogram2D &h2, int il, int iu) |
IHistogram2D * | projectionXY (const std::string &, const IHistogram3D &) |
LWH cannot create an IHistogram2D by projecting an IHistogram3D on the x-y plane. | |
IHistogram2D * | projectionXZ (const std::string &, const IHistogram3D &) |
LWH cannot create an IHistogram2D by projecting an IHistogram3D on the x-z plane. | |
IHistogram2D * | projectionYZ (const std::string &, const IHistogram3D &) |
LWH cannot create an IHistogram2D by projecting an IHistogram3D on the y-z plane. | |
IHistogram2D * | sliceXY (const std::string &, const IHistogram3D &, int, int) |
LWH cannot create an IHistogram2D by slicing an IHistogram3D perpendicular to the Z axis, between "index1" and "index2" (inclusive). | |
IHistogram2D * | sliceXZ (const std::string &, const IHistogram3D &, int, int) |
LWH cannot create an IHistogram2D by slicing an IHistogram3D perpendicular to the Y axis, between "index1" and "index2" (inclusive). | |
IHistogram2D * | sliceYZ (const std::string &, const IHistogram3D &, int, int) |
LWH cannot create an IHistogram2D by slicing an IHistogram3D perpendicular to the X axis, between "index1" and "index2" (inclusive). | |
Static Private Member Functions | |
template<typename T > | |
static T * | error (std::string feature) |
Throw a suitable error. More... | |
Private Attributes | |
Tree * | tree |
The tree where the actual histograms are stored. More... | |
User level interface for factory classes of Histograms (binned, unbinned, and profile).
The created objects are assumed to be managed by the tree which is associated to the factory. So far only one-dimensional histograms are implemented in LWH.
Definition at line 32 of file HistogramFactory.h.
|
inline |
Create a Histogram1D by adding two Histogram1D.
path | The path of the created IHistogram. The path must be a full path. ("/folder1/folder2/dataName" is a valid path). The characther / cannot be used in names; it is only used to delimit directories within paths. |
hist1 | The first member of the addition. |
hist2 | The second member of the addition. |
std::runtime_error | if histogram could not be created. |
Definition at line 456 of file HistogramFactory.h.
References LWH::Histogram1D::add(), and LWH::Histogram1D::setTitle().
|
inline |
Create an IHistogram1D by adding two IHistogram1D.
path | The path of the created IHistogram. The path must be a full path. ("/folder1/folder2/dataName" is a valid path). The characther / cannot be used in names; it is only used to delimit directories within paths. |
hist1 | The first member of the addition. |
hist2 | The second member of the addition. |
std::runtime_error | if histogram could not be created. |
Definition at line 477 of file HistogramFactory.h.
|
inline |
Create a copy of an IHistogram1D.
path | The path of the created IHistogram. The path must be a full path. ("/folder1/folder2/dataName" is a valid path). The characther / cannot be used in names; it is only used to delimit directories within paths. |
hist | The IHistogram1D to be copied. |
std::runtime_error | if histogram could not be created. |
Definition at line 214 of file HistogramFactory.h.
References LWH::Histogram1D::setTitle().
|
inline |
Create a IHistogram1D.
path | The path of the created IHistogram. The path must be a full path. ("/folder1/folder2/dataName" is a valid path). The characther / cannot be used in names; it is only used to delimit directories within paths. |
title | The title of the IHistogram1D. |
nBins | The number of bins of the x axis. |
lowerEdge | The lower edge of the x axis. |
upperEdge | The upper edge of the x axis. |
std::runtime_error | if histogram could not be created. |
Definition at line 142 of file HistogramFactory.h.
References LWH::Histogram1D::setTitle().
|
inline |
Create a IHistogram1D.
pathAndTitle | The path of the created IHistogram. The path must be a full path. ("/folder1/folder2/dataName" is a valid path). The characther / cannot be used in names; it is only used to delimit directories within paths. |
nBins | The number of bins of the x axis. |
lowerEdge | The lower edge of the x axis. |
upperEdge | The upper edge of the x axis. |
std::runtime_error | if histogram could not be created. |
Definition at line 169 of file HistogramFactory.h.
|
inline |
Create a IHistogram1D.
path | The path of the created IHistogram. The path can either be a relative or full path. ("/folder1/folder2/dataName" and "../folder/dataName" are valid paths). All the directories in the path must exist. The characther / cannot be used in names; it is only used to delimit directories within paths. |
title | The title of the IHistogram1D. |
binEdges | The array of the bin edges for the x axis. |
Definition at line 189 of file HistogramFactory.h.
References LWH::Histogram1D::setTitle().
|
inline |
Destroy an IBaseHistogram object.
hist | The IBaseHistogram to be destroyed. |
Definition at line 52 of file HistogramFactory.h.
|
inline |
Create n Histogram1D by dividing two Histogram1D.
path | The path of the created IHistogram. The path must be a full path. ("/folder1/folder2/dataName" is a valid path). The characther / cannot be used in names; it is only used to delimit directories within paths. |
h1 | The first member of the division. |
h2 | The second member of the division. |
std::runtime_error | if histogram could not be created. |
Definition at line 578 of file HistogramFactory.h.
References LWH::Histogram1D::ax, LWH::Histogram1D::setTitle(), LWH::Histogram1D::sum, LWH::Histogram1D::sumw, and LWH::Histogram1D::sumw2.
|
inline |
Create an IHistogram1D by dividing two IHistogram1D.
path | The path of the created IHistogram. The path must be a full path. ("/folder1/folder2/dataName" is a valid path). The characther / cannot be used in names; it is only used to delimit directories within paths. |
hist1 | The first member of the division. |
hist2 | The second member of the division. |
std::runtime_error | if histogram could not be created. |
Definition at line 609 of file HistogramFactory.h.
|
inlinestaticprivate |
Throw a suitable error.
Definition at line 1025 of file HistogramFactory.h.
|
inline |
Create a Histogram1D by multiplying two Histogram1D.
path | The path of the created IHistogram. The path must be a full path. ("/folder1/folder2/dataName" is a valid path). The characther / cannot be used in names; it is only used to delimit directories within paths. |
h1 | The first member of the multiplication. |
h2 | The second member of the multiplication. |
std::runtime_error | if histogram could not be created. |
Definition at line 536 of file HistogramFactory.h.
References LWH::Histogram1D::ax, LWH::Histogram1D::setTitle(), LWH::Histogram1D::sumw, and LWH::Histogram1D::sumw2.
|
inline |
Create an IHistogram1D by multiplying two IHistogram1D.
path | The path of the created IHistogram. The path must be a full path. ("/folder1/folder2/dataName" is a valid path). The characther / cannot be used in names; it is only used to delimit directories within paths. |
hist1 | The first member of the multiplication. |
hist2 | The second member of the multiplication. |
std::runtime_error | if histogram could not be created. |
Definition at line 561 of file HistogramFactory.h.
|
inline |
Create a Histogram1D by subtracting two Histogram1D.
path | The path of the created IHistogram. The path must be a full path. ("/folder1/folder2/dataName" is a valid path). The characther / cannot be used in names; it is only used to delimit directories within paths. |
h1 | The first member of the subtraction. |
h2 | The second member of the subtraction. |
std::runtime_error | if histogram could not be created. |
Definition at line 494 of file HistogramFactory.h.
References LWH::Histogram1D::ax, LWH::Histogram1D::setTitle(), LWH::Histogram1D::sum, LWH::Histogram1D::sumw, and LWH::Histogram1D::sumw2.
|
inline |
Create an IHistogram1D by subtracting two IHistogram1D.
path | The path of the created IHistogram. The path must be a full path. ("/folder1/folder2/dataName" is a valid path). The characther / cannot be used in names; it is only used to delimit directories within paths. |
hist1 | The first member of the subtraction. |
hist2 | The second member of the subtraction. |
std::runtime_error | if histogram could not be created. |
Definition at line 519 of file HistogramFactory.h.
|
private |
The tree where the actual histograms are stored.
Definition at line 1030 of file HistogramFactory.h.