 |
Belle II Software
release-05-02-19
|
12 #ifndef INCLUDE_GUARD_BELLE2_MVA_INTERFACE_HEADER
13 #define INCLUDE_GUARD_BELLE2_MVA_INTERFACE_HEADER
15 #include <mva/interface/Teacher.h>
16 #include <mva/interface/Expert.h>
67 virtual std::unique_ptr<SpecificOptions>
getOptions()
const = 0;
80 virtual std::unique_ptr<MVA::Expert>
getExpert()
const = 0;
100 template<
class TemplateOptions,
class TemplateTeacher,
class TemplateExpert>
112 virtual std::unique_ptr<SpecificOptions>
getOptions()
const override {
return std::unique_ptr<SpecificOptions>(
new TemplateOptions); }
122 return std::unique_ptr<Teacher>(
new TemplateTeacher(general_options,
dynamic_cast<const TemplateOptions&
>(specific_options)));
128 virtual std::unique_ptr<MVA::Expert>
getExpert()
const override {
return std::unique_ptr<MVA::Expert>(
new TemplateExpert); }
Abstract Interface to third-party MVA libraries.
static std::map< std::string, AbstractInterface * > getSupportedInterfaces()
Returns interfaces supported by the MVA Interface.
virtual ~AbstractInterface()
Virtual destructor.
std::string m_name
Name of the third-party library.
virtual std::unique_ptr< SpecificOptions > getOptions() const =0
Get Options of this MVA library.
virtual std::unique_ptr< Teacher > getTeacher(const GeneralOptions &general_options, const SpecificOptions &specific_options) const override
Get Teacher of this MVA library.
Specific Options, all mehtod Options have to inherit from this class.
Interface()
Constructs a new interface with the given name.
Abstract base class for different kinds of events.
virtual std::unique_ptr< SpecificOptions > getOptions() const override
Get Options of this MVA library.
std::string getName() const
Returns the name of the third-party MVA library.
virtual std::unique_ptr< Teacher > getTeacher(const GeneralOptions &general_options, const SpecificOptions &specific_options) const =0
Get Teacher of this MVA library.
General options which are shared by all MVA trainings.
static void initSupportedInterfaces()
Static function which initliazes all supported interfaces, has to be called once before getSupportedI...
AbstractInterface(const std::string &name)
Creates a new Interface to a third-party library.
virtual std::unique_ptr< MVA::Expert > getExpert() const override
Get Exoert of this MVA library.
static std::map< std::string, AbstractInterface * > s_supported_interfaces
Map of supported interfaces.
Template class to easily construct a interface for an MVA library using a library-specific Options,...
virtual std::unique_ptr< MVA::Expert > getExpert() const =0
Get Exoert of this MVA library.