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 analysistree data");
45 config_add(
"transport,t", po::value<vector<string>>(&
fTra)->value_name(
"<file names>")->multitoken(),
46 "name of transport input sources (ROOT files)");
47 config_add(
"digitization,d", po::value<string>(&
fRaw)->value_name(
"<file name>"),
48 "name of the raw ROOT file containing digi data");
49 config_add(
"parameter,p", po::value<string>(&
fPar)->value_name(
"<file name>"),
50 "name of a parameter ROOT file (FairRuntimeDb format)");
51 config_add(
"reconstruction,r", po::value<string>(&
fReco)->value_name(
"<file nams>"),
52 "name of a reconstruction ROOT file");
53 config_add(
"config,c", po::value<string>(&
fConfig)->value_name(
"<file name>")->default_value(defconfig),
54 "name of a YAML file describing the configuration of reconstruction");
55 config_add(
"setup,s", po::value<string>(&
fSetup)->value_name(
"<tag>")->default_value(
DEFAULT_SETUP),
56 "geometry setup tag");
57 config_add(
"overwrite,w", po::bool_switch(&
fOverwrite)->default_value(
false),
58 "allow to overwite an existing output file");
61 po::options_description cmdline_options(
"Allowed options");
62 cmdline_options.add(generic).add(config);
65 po::variables_map vars;
66 po::store(po::parse_command_line(argc, argv, cmdline_options), vars);
70 if (vars.count(
"help") != 0u) {
71 std::cout << cmdline_options << std::endl;
76 if (vars.count(
"output") == 0u) {
throw std::runtime_error(
"no output file name specified"); }
77 if (vars.count(
"transport") == 0u) {
throw std::runtime_error(
"no transport file name specified"); }
78 if (vars.count(
"digitization") == 0u) {
throw std::runtime_error(
"no digitization (raw) file name specified"); }
79 if (vars.count(
"parameter") == 0u) {
throw std::runtime_error(
"no parameter file name specified"); }
80 if (vars.count(
"reconstruction") == 0u) {
throw std::runtime_error(
"no reconstruction file name specified"); }