12#include <mva/utility/Utility.h>
14namespace po = boost::program_options;
15using namespace Belle2::MVA;
17int main(
int argc,
char* argv[])
20 std::vector<std::string> filenames;
21 std::vector<std::string> datafiles;
22 std::string treename =
"variables";
23 std::string outputfile;
24 bool copy_target =
true;
26 po::options_description description(
"Options");
27 description.add_options()
28 (
"help",
"print this message")
29 (
"identifiers", po::value<std::vector<std::string>>(&filenames)->multitoken(),
"Identifiers of the trained methods")
30 (
"datafiles", po::value<std::vector<std::string>>(&datafiles)->multitoken()->required(),
31 "ROOT files containing the dataset")
32 (
"treename", po::value<std::string>(&treename),
"Name of tree in ROOT datafile")
33 (
"outputfile", po::value<std::string>(&outputfile)->required(),
"ROOT file containing the results")
34 (
"copy_target", po::value<bool>(©_target),
"defines if the target variable should be copied");
39 po::parsed_options parsed = po::command_line_parser(argc, argv).options(description).run();
40 po::store(parsed, vm);
42 if (vm.count(
"help")) {
43 std::cout << description << std::endl;
47 }
catch (po::error& err) {
48 std::cerr <<
"Error: " << err.what() <<
"\n";
static void expert(const std::vector< std::string > &filenames, const std::vector< std::string > &datafiles, const std::string &treename, const std::string &outputfile, int experiment=0, int run=0, int event=0, bool copy_target=true)
Convenience function applies experts on given data.