9#include <mva/interface/Interface.h>
10#include <framework/utilities/TestHelpers.h>
12#include <gtest/gtest.h>
21 void load(
const boost::property_tree::ptree&)
override { }
22 void save(boost::property_tree::ptree&)
const override { }
23 po::options_description getDescription()
override
25 po::options_description description(
"General options");
26 description.add_options()
27 (
"help",
"print this message");
30 [[nodiscard]] std::string getMethod()
const override {
return "Test"; }
35 TestTeacher(
const MVA::GeneralOptions& g,
const TestOptions&) : MVA::Teacher(g) { }
36 MVA::Weightfile train(MVA::Dataset&)
const override {
return MVA::Weightfile(); }
41 void load(MVA::Weightfile&)
override { }
42 std::vector<float> apply(MVA::Dataset&)
const override {
return std::vector<float>(); };
45 TEST(InterfaceTest, InterfaceCreation)
50 EXPECT_EQ(interface.
getName(),
"Test");
52 EXPECT_TRUE(supported_interfaces.find(
"Test") != supported_interfaces.end());
53 EXPECT_EQ(supported_interfaces[
"Test"], &interface);
66 EXPECT_TRUE(supported_interfaces.find(
"Test") == supported_interfaces.end());
std::string getName() const
Returns the name of the third-party MVA library.
static std::map< std::string, AbstractInterface * > getSupportedInterfaces()
Returns interfaces supported by the MVA Interface.
Abstract base class of all Expert Each MVA library has its own implementation of this class,...
General options which are shared by all MVA trainings.
Template class to easily construct a interface for an MVA library using a library-specific Options,...
virtual std::unique_ptr< MVA::Expert > getExpert() const override
Get Exoert 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.
virtual std::unique_ptr< SpecificOptions > getOptions() const override
Get Options of this MVA library.
Specific Options, all method Options have to inherit from this class.
Abstract base class of all Teachers Each MVA library has its own implementation of this class,...
Abstract base class for different kinds of events.