Belle II Software  release-05-02-19
Interface.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2016 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Thomas Keck *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #include <mva/interface/Interface.h>
12 #include <mva/methods/FastBDT.h>
13 #include <mva/methods/RegressionFastBDT.h>
14 #include <mva/methods/TMVA.h>
15 #include <mva/methods/Python.h>
16 #include <mva/methods/FANN.h>
17 #include <mva/methods/PDF.h>
18 #include <mva/methods/Trivial.h>
19 #include <mva/methods/Reweighter.h>
20 #include <mva/methods/Combination.h>
21 
22 namespace Belle2 {
27  namespace MVA {
28 
29  AbstractInterface::AbstractInterface(const std::string& name) : m_name(name)
30  {
31  if (s_supported_interfaces.find(m_name) != s_supported_interfaces.end()) {
32  B2WARNING("An interface with the name " << m_name << " already exists!");
33  } else {
34  s_supported_interfaces.insert(std::make_pair(name, this));
35  }
36  }
37 
38  AbstractInterface::~AbstractInterface()
39  {
40  s_supported_interfaces.erase(m_name);
41  }
42 
43  std::string AbstractInterface::getName() const { return m_name; }
44 
45  std::map<std::string, AbstractInterface*> AbstractInterface::s_supported_interfaces;
46 
47  void AbstractInterface::initSupportedInterfaces()
48  {
53  interface_TMVAClassification;
61  }
62 
63  }
65 }
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::MVA::AbstractInterface::AbstractInterface
AbstractInterface(const std::string &name)
Creates a new Interface to a third-party library.
Definition: Interface.cc:37
Belle2::MVA::Interface
Template class to easily construct a interface for an MVA library using a library-specific Options,...
Definition: Interface.h:101