Belle II Software development
HistogramFactory.cc
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#include <tracking/dqmUtils/HistogramFactory.h>
10
11using namespace Belle2::HistogramFactory;
12
13TH1F* Factory::CreateTH1F(std::string name, std::string title)
14{
15 return m_histoModule->Create(name, title, m_nbinsx.Get(), m_xlow.Get(), m_xup.Get(), m_xTitle.Get(), m_yTitle.Get());
16}
17
18TH2F* Factory::CreateTH2F(std::string name, std::string title)
19{
20 return m_histoModule->Create(name, title, m_nbinsx.Get(), m_xlow.Get(), m_xup.Get(), m_nbinsy.Get(), m_ylow.Get(), m_yup.Get(),
22}
23
24TH1F** Factory::CreateLayersTH1F(boost::format nameTemplate, boost::format titleTemplate)
25{
26 return m_histoModule->CreateLayers(nameTemplate, titleTemplate, m_nbinsx.Get(), m_xlow.Get(), m_xup.Get(), m_xTitle.Get(),
27 m_yTitle.Get());
28}
29
30TH2F** Factory::CreateLayersTH2F(boost::format nameTemplate, boost::format titleTemplate)
31{
32 return m_histoModule->CreateLayers(nameTemplate, titleTemplate, m_nbinsx.Get(), m_xlow.Get(), m_xup.Get(), m_nbinsy.Get(),
34}
35
36TH1F** Factory::CreateSensorsTH1F(boost::format nameTemplate, boost::format titleTemplate)
37{
38 return m_histoModule->CreateSensors(nameTemplate, titleTemplate, m_nbinsx.Get(), m_xlow.Get(), m_xup.Get(), m_xTitle.Get(),
39 m_yTitle.Get());
40}
41
42TH2F** Factory::CreateSensorsTH2F(boost::format nameTemplate, boost::format titleTemplate)
43{
44 return m_histoModule->CreateSensors(nameTemplate, titleTemplate, m_nbinsx.Get(), m_xlow.Get(), m_xup.Get(), m_nbinsy.Get(),
46}
virtual TH1F ** CreateSensors(boost::format nameTemplate, boost::format titleTemplate, int nbinsx, double xlow, double xup, std::string xTitle, std::string yTitle)
Function to create array of TH1F histograms, one for each sensor.
virtual TH1F * Create(std::string name, std::string title, int nbinsx, double xlow, double xup, std::string xTitle, std::string yTitle)
Function to create TH1F and add it to the vector of histograms (m_histograms).
virtual TH1F ** CreateLayers(boost::format nameTemplate, boost::format titleTemplate, int nbinsx, double xlow, double xup, std::string xTitle, std::string yTitle)
Function to create array of TH1F histograms, one for each layer.
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.
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.
Parameter< double > m_xup
upper boundary of x axis range
Parameter< std::string > m_yTitle
title of the y axis
Parameter< int > m_nbinsy
number of bins along the y axis
TH1F * CreateTH1F(std::string name, std::string title)
Create TH1F with given name and title.
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
Parameter< int > m_nbinsx
number of bins along the x axis
Parameter< std::string > m_xTitle
title of the x axis
Parameter< double > m_yup
upper boundary of y axis range
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.
AType Get()
Returns value of the inner quantity.