Belle II Software  release-08-01-10
TrivialOptions Class Reference

Options for the Trivial MVA method. More...

#include <Trivial.h>

Inheritance diagram for TrivialOptions:
Collaboration diagram for TrivialOptions:

Public Member Functions

virtual void load (const boost::property_tree::ptree &pt) override
 Load mechanism to load Options from a xml tree. More...
 
virtual void save (boost::property_tree::ptree &pt) const override
 Save mechanism to store Options in a xml tree. More...
 
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

double m_output = 0.5
 Output of the trivial method.
 
std::vector< double > m_multiple_output = {}
 Output of the trivial method.
 
bool m_passthrough = false
 Flag for passthrough setting.
 

Detailed Description

Options for the Trivial MVA method.

Used for debugging and testing

Definition at line 28 of file Trivial.h.

Member Function Documentation

◆ load()

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

Load mechanism to load Options from a xml tree.

Parameters
ptxml tree

Implements Options.

Definition at line 20 of file Trivial.cc.

21  {
22  int version = pt.get<int>("Trivial_version");
23  if (version != 1) {
24  B2ERROR("Unknown weightfile version " << std::to_string(version));
25  throw std::runtime_error("Unknown weightfile version " + std::to_string(version));
26  }
27  m_output = pt.get<double>("Trivial_output");
28 
29  auto numberOfOutputs = pt.get<unsigned int>("Trivial_number_of_multiple_outputs", 0u);
30  m_multiple_output.resize(numberOfOutputs);
31  for (unsigned int i = 0; i < numberOfOutputs; ++i) {
32  m_multiple_output[i] = pt.get<double>(std::string("Trivial_multiple_output") + std::to_string(i));
33  }
34 
35  m_passthrough = pt.get<bool>("Trivial_passthrough", false);
36  }
double m_output
Output of the trivial method.
Definition: Trivial.h:53
std::vector< double > m_multiple_output
Output of the trivial method.
Definition: Trivial.h:54
bool m_passthrough
Flag for passthrough setting.
Definition: Trivial.h:55

◆ save()

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

Save mechanism to store Options in a xml tree.

Parameters
ptxml tree

Implements Options.

Definition at line 38 of file Trivial.cc.


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