Belle II Software
release-08-02-06
Main Page
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
z
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
w
x
z
Typedefs
a
b
c
d
e
g
i
k
l
m
n
p
r
s
t
u
v
w
Enumerations
a
b
c
e
f
g
n
p
s
v
z
Enumerator
c
d
f
p
t
u
v
w
Classes
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Enumerations
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
Enumerator
a
b
c
d
e
f
g
h
k
l
m
n
o
p
r
s
t
u
v
w
z
Related Functions
b
c
d
g
i
o
r
s
t
Files
File List
File Members
All
Functions
Typedefs
Macros
basf2_mva_extract.cc
1
/**************************************************************************
2
* basf2 (Belle II Analysis Software Framework) *
3
* Author: The Belle II Collaboration *
4
* *
5
* See git log for contributors and copyright holders. *
6
* This file is licensed under LGPL-3.0, see LICENSE.md. *
7
**************************************************************************/
8
9
#include <iostream>
10
#include <vector>
11
12
#include <mva/utility/Utility.h>
13
14
namespace
po = boost::program_options;
15
using namespace
Belle2::MVA;
16
17
int
main
(
int
argc,
char
* argv[])
18
{
19
20
std::vector<std::string> filenames;
21
std::string directory;
22
23
po::options_description description(
"Options"
);
24
description.add_options()
25
(
"help"
,
"print this message"
)
26
(
"identifiers"
, po::value<std::vector<std::string>>(&filenames)->multitoken(),
"Identifiers of the trained methods"
)
27
(
"directory"
, po::value<std::string>(&directory)->required(),
28
"Directory which will contain the temporary directories generated by the the mva package"
);
29
30
po::variables_map vm;
31
32
try
{
33
po::parsed_options parsed = po::command_line_parser(argc, argv).options(description).run();
34
po::store(parsed, vm);
35
36
if
(vm.count(
"help"
)) {
37
std::cout << description << std::endl;
38
return
1;
39
}
40
po::notify(vm);
41
}
catch
(po::error& err) {
42
std::cerr <<
"Error: "
<< err.what() <<
"\n"
;
43
return
1;
44
}
45
46
for
(
const
auto
& filename : filenames)
47
Belle2::MVA::Utility::extract
(filename, directory);
48
return
0;
49
50
}
51
Belle2::MVA::Utility::extract
static void extract(const std::string &filename, const std::string &directory)
Convenience function which extracts the expertise in a given weightfile into a temporary directory.
Definition:
Utility.cc:83
main
int main(int argc, char **argv)
Run all tests.
Definition:
test_main.cc:91
mva
tools
basf2_mva_extract.cc
Generated on Tue Jan 28 2025 01:55:20 for Belle II Software by
1.9.1