23int main(
int argc,
char** argv)
25 bpo::variables_map vm;
26 bpo::options_description opt_general(
"Usage:\n " + std::string(argv[0]) +
27 "Convert FV0 digits to CRU raw data\n");
28 bpo::options_description opt_hidden(
"");
29 bpo::options_description opt_all;
30 bpo::positional_options_description opt_pos;
33 opt_general.add_options()(
"help,h",
"Print this help message");
37 opt_all.add(opt_general).add(opt_hidden);
38 bpo::store(bpo::command_line_parser(argc, argv).options(opt_all).positional(opt_pos).run(), vm);
40 if (vm.count(
"help")) {
41 std::cout << opt_general << std::endl;
46 }
catch (bpo::error& e) {
47 std::cerr <<
"ERROR: " << e.what() << std::endl
49 std::cerr << opt_general << std::endl;
51 }
catch (std::exception& e) {
52 std::cerr << e.what() <<
", application will now exit" << std::endl;