33 po::options_description
generic(
"Generic options");
34 auto generic_add =
generic.add_options();
35 generic_add(
"help,h",
"display this help and exit");
38 string defconfig = std::getenv(
"VMCWORKDIR");
39 defconfig.append(
"/");
41 po::options_description config(
"Configuration");
42 auto config_add = config.add_options();
43 config_add(
"output,o", po::value<string>(&
fOutput)->value_name(
"<file name>"),
44 "name of the output ROOT file with digi data");
45 config_add(
"transport,t", po::value<vector<string>>(&
fTra)->value_name(
"<file names>")->multitoken(),
46 "names of a transport input sources (ROOT files)");
47 config_add(
"parameter,p", po::value<string>(&
fPar)->value_name(
"<file name>"),
48 "name of a parameter ROOT file (FairRuntimeDb format)");
49 config_add(
"config,c", po::value<string>(&
fConfig)->value_name(
"<file name>")->default_value(defconfig),
50 "name of a YAML file describing the configuration of reconstruction");
51 config_add(
"setup,s", po::value<string>(&
fSetup)->value_name(
"<tag>")->default_value(
DEFAULT_SETUP),
52 "geometry setup tag");
53 config_add(
"overwrite,w", po::bool_switch(&
fOverwrite)->default_value(
false),
54 "allow to overwite an existing output file");
57 po::options_description cmdline_options(
"Allowed options");
58 cmdline_options.add(generic).add(config);
61 po::variables_map vars;
62 po::store(po::parse_command_line(argc, argv, cmdline_options), vars);
66 if (vars.count(
"help") != 0u) {
67 std::cout << cmdline_options << std::endl;
72 if (vars.count(
"output") == 0u) {
73 throw std::runtime_error(
"no output file name specified");
75 if (vars.count(
"transport") == 0u) {
76 throw std::runtime_error(
"no transport file name specified");
78 if (vars.count(
"parameter") == 0u) {
79 throw std::runtime_error(
"no parameter file name specified");