8 #include <boost/program_options.hpp>
14 namespace po = boost::program_options;
16 std::string
usage =
"usage: " + std::string(
argv[0]) +
" <files>..."
17 +
" -o <output> [-h] [opts...]\n";
18 po::options_description
opt(
usage +
"\nConvert a root tree to HDF5");
28 "tree to use, use whatever is there by default (or crash if multiple)")
29 (
"help,h",
"Print help messages")
32 "regex to filter branches")
35 "max size of vectors to write")
38 "print branches copied")
41 "number of entries to copy")
44 "chunk size in HDF5 file")
47 "selection string applied to ntuples")
53 po::positional_options_description pos_opts;
54 pos_opts.add(
"in-file", -1);
59 .positional(pos_opts).
run(), vm);
60 if ( vm.count(
"help") ) {
61 std::cout <<
opt << std::endl;
66 std::cerr <<
usage <<
"ERROR: " <<
err.what() << std::endl;