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 { }
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"; }
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 Datasets given to the MVA interface The current event can always be access...
Abstract base class of all Expert Each MVA library has its own implementation of this class,...
virtual std::vector< float > apply(Dataset &test_data) const =0
Apply this expert onto a dataset.
virtual void load(Weightfile &weightfile)=0
Load the expert from a Weightfile.
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.
virtual po::options_description getDescription()=0
Returns a program options description for all available options.
virtual void load(const boost::property_tree::ptree &pt)=0
Load mechanism (used by Weightfile) to load Options from a xml tree.
virtual void save(boost::property_tree::ptree &pt) const =0
Save mechanism (used by Weightfile) to store Options in a xml tree.
Specific Options, all method Options have to inherit from this class.
virtual std::string getMethod() const =0
Returns method name, used in the interface to register the method.
Abstract base class of all Teachers Each MVA library has its own implementation of this class,...
The Weightfile class serializes all information about a training into an xml tree.
Abstract base class for different kinds of events.