Belle II Software
release-05-01-25
basf2_mva_available.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
12
#include <mva/utility/Utility.h>
13
14
#include <iostream>
15
16
namespace
po = boost::program_options;
17
18
int
main
(
int
argc,
char
* argv[])
19
{
20
21
std::string identifier;
22
23
int
event
= 0;
24
int
run = 0;
25
int
experiment = 0;
26
27
po::options_description description(
"Options"
);
28
description.add_options()
29
(
"help"
,
"print this message"
)
30
(
"identifier"
, po::value<std::string>(&identifier)->required(),
"Database identifier or weightfile"
)
31
(
"experiment"
, po::value<int>(&experiment),
"Experiment for which the weightfile should be valid"
)
32
(
"run"
, po::value<int>(&run),
"Run for which the weightfile should be valid"
)
33
(
"event"
, po::value<int>(&event),
"Experiment for which the weightfile should be valid"
);
34
po::variables_map vm;
35
36
try
{
37
po::parsed_options parsed = po::command_line_parser(argc, argv).options(description).run();
38
po::store(parsed, vm);
39
40
if
(vm.count(
"help"
)) {
41
std::cout << description << std::endl;
42
return
1;
43
}
44
po::notify(vm);
45
}
catch
(po::error& err) {
46
std::cerr <<
"Error: "
<< err.what() <<
"\n"
;
47
return
1;
48
}
49
50
bool
isAvailable = Belle2::MVA::available(identifier, experiment, run, event);
51
return
(isAvailable) ? 0 : 1;
52
53
}
main
int main(int argc, char **argv)
Run all tests.
Definition:
test_main.cc:77
mva
tools
basf2_mva_available.cc
Generated on Fri Nov 5 2021 03:55:55 for Belle II Software by
1.8.17