Belle II Software development
PDFOptions Class Reference

Options for the PDF MVA method. More...

#include <PDF.h>

Inheritance diagram for PDFOptions:
SpecificOptions Options

Public Member Functions

virtual void load (const boost::property_tree::ptree &pt) override
 Load mechanism (used by Weightfile) to load Options from a xml tree.
 
virtual void save (boost::property_tree::ptree &pt) const override
 Save mechanism (used by Weightfile) to store Options in a xml tree.
 
virtual po::options_description getDescription () override
 Returns a program options description for all available options.
 
virtual std::string getMethod () const override
 Return method name.
 

Public Attributes

std::string m_binning = "frequency"
 which type of binning is performed e.g.
 
std::string m_mode = "probability"
 mode which defines the final output e.g.
 
unsigned int m_nBins = 100
 number of bins used to bin the data
 

Detailed Description

Options for the PDF MVA method.

Definition at line 29 of file PDF.h.

Member Function Documentation

◆ getDescription()

po::options_description getDescription ( )
overridevirtual

Returns a program options description for all available options.

Implements Options.

Definition at line 40 of file PDF.cc.

41 {
42 po::options_description description("PDF options");
43 description.add_options()
44 ("binning", po::value<std::string>(&m_binning), "Binning used to bin the data (frequency|equidistant)")
45 ("nBins", po::value<unsigned int>(&m_nBins), "Number of bins used to bin the data")
46 ("mode", po::value<std::string>(&m_mode), "Mode used to calculate return value of expert");
47 return description;
48 }
unsigned int m_nBins
number of bins used to bin the data
Definition: PDF.h:56
std::string m_binning
which type of binning is performed e.g.
Definition: PDF.h:54
std::string m_mode
mode which defines the final output e.g.
Definition: PDF.h:55

◆ getMethod()

virtual std::string getMethod ( ) const
inlineoverridevirtual

Return method name.

Implements SpecificOptions.

Definition at line 52 of file PDF.h.

52{ return "PDF"; }

◆ load()

void load ( const boost::property_tree::ptree &  pt)
overridevirtual

Load mechanism (used by Weightfile) to load Options from a xml tree.

Parameters
ptxml tree

Implements Options.

Definition at line 19 of file PDF.cc.

20 {
21 int version = pt.get<int>("PDF_version");
22 if (version != 1) {
23 B2ERROR("Unknown weightfile version " << std::to_string(version));
24 throw std::runtime_error("Unknown weightfile version " + std::to_string(version));
25 }
26 m_binning = pt.get<std::string>("PDF_binning");
27 m_mode = pt.get<std::string>("PDF_mode");
28 m_nBins = pt.get<unsigned int>("PDF_nBins");
29
30 }

◆ save()

void save ( boost::property_tree::ptree &  pt) const
overridevirtual

Save mechanism (used by Weightfile) to store Options in a xml tree.

Parameters
ptxml tree

Implements Options.

Definition at line 32 of file PDF.cc.

33 {
34 pt.put("PDF_version", 1);
35 pt.put("PDF_binning", m_binning);
36 pt.put("PDF_mode", m_mode);
37 pt.put("PDF_nBins", m_nBins);
38 }

Member Data Documentation

◆ m_binning

std::string m_binning = "frequency"

which type of binning is performed e.g.

frequency or equidistant

Definition at line 54 of file PDF.h.

◆ m_mode

std::string m_mode = "probability"

mode which defines the final output e.g.

probability

Definition at line 55 of file PDF.h.

◆ m_nBins

unsigned int m_nBins = 100

number of bins used to bin the data

Definition at line 56 of file PDF.h.


The documentation for this class was generated from the following files: