Belle II Software
release-05-01-25
basf2_mva_extract.cc
1
/**************************************************************************
2
* BASF2 (Belle Analysis Framework 2) *
3
* Copyright(C) 2016 - Belle II Collaboration *
4
* *
5
* Author: The Belle II Collaboration *
6
* Contributors: Thomas Keck *
7
* *
8
* This software is provided "as is" without any warranty. *
9
**************************************************************************/
10
11
#include <iostream>
12
#include <vector>
13
14
#include <mva/utility/Utility.h>
15
16
namespace
po = boost::program_options;
17
using namespace
Belle2::MVA;
18
19
int
main
(
int
argc,
char
* argv[])
20
{
21
22
std::vector<std::string> filenames;
23
std::string directory;
24
25
po::options_description description(
"Options"
);
26
description.add_options()
27
(
"help"
,
"print this message"
)
28
(
"identifiers"
, po::value<std::vector<std::string>>(&filenames)->multitoken(),
"Identifiers of the trained methods"
)
29
(
"directory"
, po::value<std::string>(&directory)->required(),
30
"Directory which will contain the temporary directories generated by the the mva package"
);
31
32
po::variables_map vm;
33
34
try
{
35
po::parsed_options parsed = po::command_line_parser(argc, argv).options(description).run();
36
po::store(parsed, vm);
37
38
if
(vm.count(
"help"
)) {
39
std::cout << description << std::endl;
40
return
1;
41
}
42
po::notify(vm);
43
}
catch
(po::error& err) {
44
std::cerr <<
"Error: "
<< err.what() <<
"\n"
;
45
return
1;
46
}
47
48
for
(
const
auto
& filename : filenames)
49
Belle2::MVA::extract(filename, directory);
50
return
0;
51
52
}
53
main
int main(int argc, char **argv)
Run all tests.
Definition:
test_main.cc:77
mva
tools
basf2_mva_extract.cc
Generated on Fri Nov 5 2021 03:55:55 for Belle II Software by
1.8.17