Belle II Software light-2406-ragdoll
basf2_mva_info.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
14namespace po = boost::program_options;
15using namespace Belle2::MVA;
16
17int main(int argc, char* argv[])
18{
19
20 std::vector<std::string> filenames;
21
22 po::options_description description("Options");
23 description.add_options()
24 ("help", "print this message")
25 ("identifiers", po::value<std::vector<std::string>>(&filenames)->multitoken(), "Identifiers of the trained methods");
26
27 po::variables_map vm;
28
29 try {
30 po::parsed_options parsed = po::command_line_parser(argc, argv).options(description).run();
31 po::store(parsed, vm);
32
33 if (vm.count("help")) {
34 std::cout << description << std::endl;
35 return 1;
36 }
37 po::notify(vm);
38 } catch (po::error& err) {
39 std::cerr << "Error: " << err.what() << "\n";
40 return 1;
41 }
42
43 for (const auto& filename : filenames) {
44 std::cout << "Information about " << filename << std::endl;
45 std::cout << Belle2::MVA::Utility::info(filename) << std::endl;
46 std::cout << std::endl;
47 }
48 return 0;
49
50}
51
static std::string info(const std::string &filename)
Print information about the classifier stored in the given weightfile.
Definition: Utility.cc:98