11 #include <tracking/dqmUtils/DQMHistoModuleBase.h>
13 namespace Belle2::HistogramFactory {
20 template <
typename AType>
31 void Set(
const AType& value);
59 template <
class AType>
68 template <
class AType>
71 if (parameter.m_isSet)
72 Set(parameter.m_value);
78 template <
class AType>
81 m_temporaryValue = value;
82 m_isSetTemporarily =
true;
87 template <
class AType>
90 if (parameter.m_isSet)
91 SetTemporarily(parameter.m_value);
96 template <
class AType>
99 if (m_isSetTemporarily) {
100 m_isSetTemporarily =
false;
101 return m_temporaryValue;
211 TH1F*
CreateTH1F(std::string name, std::string title);
213 TH2F*
CreateTH2F(std::string name, std::string title);
216 TH1F**
CreateLayersTH1F(boost::format nameTemplate, boost::format titleTemplate);
218 TH2F**
CreateLayersTH2F(boost::format nameTemplate, boost::format titleTemplate);
220 TH1F**
CreateSensorsTH1F(boost::format nameTemplate, boost::format titleTemplate);
222 TH2F**
CreateSensorsTH2F(boost::format nameTemplate, boost::format titleTemplate);
This class serves as a base for the TrackDQMModule and AlignDQMModule (and possibly other DQM histogr...
This class unites some parameters for Factory which describe one axis of histogram.
Parameter< double > m_low
lower boundary of axis range
Parameter< std::string > m_title
title of axis
Axis & nbins(int nbins)
Set value of nbins.
Axis & title(std::string title)
Set value of title.
Axis(int nbins, double low, double up, std::string title)
Constructor.
Parameter< double > m_up
upper boundary of axis range
Axis & up(double up)
Set value of up.
Parameter< int > m_nbins
number of bins in the axis
Axis & low(double low)
Set value of low.
This class is used for creating TH1F and TH2F objects.
TH2F * CreateTH2F(std::string name, std::string title)
Create TH2F with given name and title.
Factory & yAxisDefault(const Axis &axis)
Permanently copies parameters for y axis from given Axis.
Factory & xup(double xup)
Sets xup temporarily.
Factory & zTitle(std::string zTitle)
Sets zTitle temporarily.
Factory & xTitleDefault(std::string xTitle)
Sets xTitle permanently.
TH1F ** CreateLayersTH1F(boost::format nameTemplate, boost::format titleTemplate)
Create TH1F array for layers from given name template and title template.
Factory & ylowDefault(double ylow)
Sets ylow permanently.
Parameter< std::string > m_zTitle
title of the z axis
TH2F ** CreateLayersTH2F(boost::format nameTemplate, boost::format titleTemplate)
Create TH2F array for layers from given name template and title template.
Factory & xlowDefault(double xlow)
Sets xlow permanently.
Parameter< double > m_xup
upper boundary of x axis range
Factory & xupDefault(double xup)
Sets xup permanently.
Parameter< std::string > m_yTitle
title of the y axis
Factory & nbinsx(int nbinsx)
Sets nbinsx temporarily.
Parameter< int > m_nbinsy
number of bins along the y axis
Factory & xAxis(const Axis &axis)
Temporarily copies parameters for x axis from given Axis.
TH1F * CreateTH1F(std::string name, std::string title)
Create TH1F with given name and title.
Factory & nbinsy(int nbinsy)
Sets nbinsy temporarily.
TH2F ** CreateSensorsTH2F(boost::format nameTemplate, boost::format titleTemplate)
Create TH2F array for sensors from given name template and title template.
Parameter< double > m_ylow
lower boundary of y axis range
Factory & nbinsyDefault(int nbinsy)
Sets nbinsy permanently.
Factory & ylow(double ylow)
Sets ylow temporarily.
Factory & yTitleDefault(std::string yTitle)
Sets yTitle permanently.
Factory & yTitle(std::string yTitle)
Sets yTitle temporarily.
Factory & yAxis(const Axis &axis)
Temporarily copies parameters for y axis from given Axis.
Factory(DQMHistoModuleBase *histoModule)
Constructor.
Factory & zTitleDefault(std::string zTitle)
Sets zTitle permanently.
Parameter< int > m_nbinsx
number of bins along the x axis
Factory & xAxisDefault(const Axis &axis)
Permanently copies parameters for x axis from given Axis.
Parameter< std::string > m_xTitle
title of the x axis
Factory & yup(double yup)
Sets yup temporarily.
Parameter< double > m_yup
upper boundary of y axis range
Factory & yupDefault(double yup)
Sets yup permanently.
Factory & xTitle(std::string xTitle)
Sets xTitle temporarily.
Parameter< double > m_xlow
lower boundary of x axis range
TH1F ** CreateSensorsTH1F(boost::format nameTemplate, boost::format titleTemplate)
Create TH1F array for sensors from given name template and title template.
DQMHistoModuleBase * m_histoModule
DQM histogram module on which the Create- functions are called to create histograms.
Factory & nbinsxDefault(int nbinsx)
Sets nbinsx permanently.
Factory & xlow(double xlow)
Sets xlow temporarily.
This class represents a quantity which value can be set both permanently and temporarily.
void Set(const Parameter< AType > ¶meter)
Copy permanent value from another parameter but only if its permanent value is set.
AType m_temporaryValue
temporary value
AType Get()
Returns value of the inner quantity.
void SetTemporarily(const Parameter< AType > ¶meter)
Copy temporary value from another parameter but only if its temporary value is set.
Parameter(const AType &defaultValue)
Constructor.
bool m_isSet
determines if the permanent value is set
bool m_isSetTemporarily
determines if the temporary value is set
void Set(const AType &value)
Permanently sets inner quantity to given value.
AType m_value
permanent value
void SetTemporarily(const AType &value)
Temporarily sets inner quantity to given value.