14 #include <mva/utility/Utility.h>
16 namespace po = boost::program_options;
17 using namespace Belle2::MVA;
19 int main(
int argc,
char* argv[])
22 std::vector<std::string> filenames;
23 std::vector<std::string> datafiles;
24 std::string treename =
"variables";
25 std::string outputfile;
26 bool copy_target =
true;
28 po::options_description description(
"Options");
29 description.add_options()
30 (
"help",
"print this message")
31 (
"identifiers", po::value<std::vector<std::string>>(&filenames)->multitoken(),
"Identifiers of the trained methods")
32 (
"datafiles", po::value<std::vector<std::string>>(&datafiles)->multitoken()->required(),
33 "ROOT files containing the dataset")
34 (
"treename", po::value<std::string>(&treename),
"Name of tree in ROOT datafile")
35 (
"outputfile", po::value<std::string>(&outputfile)->required(),
"ROOT file containing the results")
36 (
"copy_target", po::value<bool>(©_target),
"defines if the target variable should be copied");
41 po::parsed_options parsed = po::command_line_parser(argc, argv).options(description).run();
42 po::store(parsed, vm);
44 if (vm.count(
"help")) {
45 std::cout << description << std::endl;
49 }
catch (po::error& err) {
50 std::cerr <<
"Error: " << err.what() <<
"\n";
54 Belle2::MVA::expert(filenames, datafiles, treename, outputfile, 0, 0, 0, copy_target);