Belle II Software
release-08-01-10
|
This class is used for creating TH1F and TH2F objects. More...
#include <HistogramFactory.h>
Public Member Functions | |
Factory (DQMHistoModuleBase *histoModule) | |
Constructor. More... | |
Factory & | xAxis (const Axis &axis) |
Temporarily copies parameters for x axis from given Axis. | |
Factory & | yAxis (const Axis &axis) |
Temporarily copies parameters for y axis from given Axis. | |
Factory & | xAxisDefault (const Axis &axis) |
Permanently copies parameters for x axis from given Axis. | |
Factory & | yAxisDefault (const Axis &axis) |
Permanently copies parameters for y axis from given Axis. | |
TH1F * | CreateTH1F (std::string name, std::string title) |
Create TH1F with given name and title. More... | |
TH2F * | CreateTH2F (std::string name, std::string title) |
Create TH2F with given name and title. | |
TH1F ** | CreateLayersTH1F (boost::format nameTemplate, boost::format titleTemplate) |
Create TH1F array for layers from given name template and title template. | |
TH2F ** | CreateLayersTH2F (boost::format nameTemplate, boost::format titleTemplate) |
Create TH2F array for layers from given name template and title template. | |
TH1F ** | CreateSensorsTH1F (boost::format nameTemplate, boost::format titleTemplate) |
Create TH1F array for sensors from given name template and title template. | |
TH2F ** | CreateSensorsTH2F (boost::format nameTemplate, boost::format titleTemplate) |
Create TH2F array for sensors from given name template and title template. | |
-Default functions | |
All the following functions permanently set the value of given parameter. They also return this instance so they can be chained. | |
Factory & | nbinsxDefault (int nbinsx) |
Sets nbinsx permanently. | |
Factory & | xlowDefault (double xlow) |
Sets xlow permanently. | |
Factory & | xupDefault (double xup) |
Sets xup permanently. | |
Factory & | nbinsyDefault (int nbinsy) |
Sets nbinsy permanently. | |
Factory & | ylowDefault (double ylow) |
Sets ylow permanently. | |
Factory & | yupDefault (double yup) |
Sets yup permanently. | |
Factory & | xTitleDefault (std::string xTitle) |
Sets xTitle permanently. | |
Factory & | yTitleDefault (std::string yTitle) |
Sets yTitle permanently. | |
Factory & | zTitleDefault (std::string zTitle) |
Sets zTitle permanently. | |
Named parameters | |
All the following functions temporarily set the value of given parameter. This means that its value is invalidated after its first use in the Create- functions. They also return this instance so they can be chained. | |
Factory & | nbinsx (int nbinsx) |
Sets nbinsx temporarily. | |
Factory & | xlow (double xlow) |
Sets xlow temporarily. | |
Factory & | xup (double xup) |
Sets xup temporarily. | |
Factory & | nbinsy (int nbinsy) |
Sets nbinsy temporarily. | |
Factory & | ylow (double ylow) |
Sets ylow temporarily. | |
Factory & | yup (double yup) |
Sets yup temporarily. | |
Factory & | xTitle (std::string xTitle) |
Sets xTitle temporarily. | |
Factory & | yTitle (std::string yTitle) |
Sets yTitle temporarily. | |
Factory & | zTitle (std::string zTitle) |
Sets zTitle temporarily. | |
Private Attributes | |
DQMHistoModuleBase * | m_histoModule |
DQM histogram module on which the Create- functions are called to create histograms. | |
Parameter< int > | m_nbinsx = Parameter(0) |
number of bins along the x axis | |
Parameter< double > | m_xlow = Parameter(.0) |
lower boundary of x axis range | |
Parameter< double > | m_xup = Parameter(.0) |
upper boundary of x axis range | |
Parameter< std::string > | m_xTitle = Parameter(std::string()) |
title of the x axis | |
Parameter< std::string > | m_yTitle = Parameter(std::string()) |
title of the y axis | |
Parameter< int > | m_nbinsy = Parameter(0) |
number of bins along the y axis | |
Parameter< double > | m_ylow = Parameter(.0) |
lower boundary of y axis range | |
Parameter< double > | m_yup = Parameter(.0) |
upper boundary of y axis range | |
Parameter< std::string > | m_zTitle = Parameter(std::string()) |
title of the z axis | |
This class is used for creating TH1F and TH2F objects.
Its main advantage is that parameters can be set individually and also permanently so they can be reused again.
This class uses named parameters idiom via temporarily set values.
Most of the methods return this object so they can be chained consecutively.
Definition at line 151 of file HistogramFactory.h.
|
inlineexplicit |
Constructor.
histoModule | - pointer on histogram module is needed because this class actually doesn't create histograms by itself, but it calls functions on the module instead. |
Definition at line 155 of file HistogramFactory.h.
TH1F * CreateTH1F | ( | std::string | name, |
std::string | title | ||
) |
Create TH1F with given name and title.
All temporarily set parameters needed to create the TH1F become invalidated. This is common for all following Create- functions.
Definition at line 13 of file HistogramFactory.cc.