Belle II Software development
|
This class is used for creating TH1F and TH2F objects. More...
#include <HistogramFactory.h>
Public Member Functions | |
Factory (DQMHistoModuleBase *histoModule) | |
Constructor. | |
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. | |
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 ** CreateLayersTH1F | ( | boost::format | nameTemplate, |
boost::format | titleTemplate | ||
) |
Create TH1F array for layers from given name template and title template.
Definition at line 24 of file HistogramFactory.cc.
TH2F ** CreateLayersTH2F | ( | boost::format | nameTemplate, |
boost::format | titleTemplate | ||
) |
Create TH2F array for layers from given name template and title template.
Definition at line 30 of file HistogramFactory.cc.
TH1F ** CreateSensorsTH1F | ( | boost::format | nameTemplate, |
boost::format | titleTemplate | ||
) |
Create TH1F array for sensors from given name template and title template.
Definition at line 36 of file HistogramFactory.cc.
TH2F ** CreateSensorsTH2F | ( | boost::format | nameTemplate, |
boost::format | titleTemplate | ||
) |
Create TH2F array for sensors from given name template and title template.
Definition at line 42 of file HistogramFactory.cc.
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.
TH2F * CreateTH2F | ( | std::string | name, |
std::string | title | ||
) |
|
inline |
Sets nbinsx temporarily.
Definition at line 238 of file HistogramFactory.h.
|
inline |
Sets nbinsx permanently.
Definition at line 223 of file HistogramFactory.h.
|
inline |
Sets nbinsy temporarily.
Definition at line 241 of file HistogramFactory.h.
|
inline |
Sets nbinsy permanently.
Definition at line 226 of file HistogramFactory.h.
Temporarily copies parameters for x axis from given Axis.
Definition at line 161 of file HistogramFactory.h.
Permanently copies parameters for x axis from given Axis.
Definition at line 183 of file HistogramFactory.h.
|
inline |
Sets xlow temporarily.
Definition at line 239 of file HistogramFactory.h.
|
inline |
Sets xlow permanently.
Definition at line 224 of file HistogramFactory.h.
|
inline |
Sets xTitle temporarily.
Definition at line 244 of file HistogramFactory.h.
|
inline |
Sets xTitle permanently.
Definition at line 229 of file HistogramFactory.h.
|
inline |
Sets xup temporarily.
Definition at line 240 of file HistogramFactory.h.
|
inline |
Sets xup permanently.
Definition at line 225 of file HistogramFactory.h.
Temporarily copies parameters for y axis from given Axis.
Definition at line 172 of file HistogramFactory.h.
|
inline |
Sets ylow temporarily.
Definition at line 242 of file HistogramFactory.h.
|
inline |
Sets ylow permanently.
Definition at line 227 of file HistogramFactory.h.
|
inline |
Sets yTitle temporarily.
Definition at line 245 of file HistogramFactory.h.
|
inline |
Sets yTitle permanently.
Definition at line 230 of file HistogramFactory.h.
|
inline |
Sets yup temporarily.
Definition at line 243 of file HistogramFactory.h.
|
inline |
Sets yup permanently.
Definition at line 228 of file HistogramFactory.h.
|
inline |
Sets zTitle temporarily.
Definition at line 246 of file HistogramFactory.h.
|
inline |
Sets zTitle permanently.
Definition at line 231 of file HistogramFactory.h.
|
private |
DQM histogram module on which the Create- functions are called to create histograms.
Definition at line 251 of file HistogramFactory.h.
number of bins along the x axis
Definition at line 253 of file HistogramFactory.h.
number of bins along the y axis
Definition at line 258 of file HistogramFactory.h.
lower boundary of x axis range
Definition at line 254 of file HistogramFactory.h.
title of the x axis
Definition at line 256 of file HistogramFactory.h.
upper boundary of x axis range
Definition at line 255 of file HistogramFactory.h.
lower boundary of y axis range
Definition at line 259 of file HistogramFactory.h.
title of the y axis
Definition at line 257 of file HistogramFactory.h.
upper boundary of y axis range
Definition at line 260 of file HistogramFactory.h.
title of the z axis
Definition at line 261 of file HistogramFactory.h.