281 std::ostringstream descstr;
282 descstr <<
argv[0] <<
" <PsetType> <options> [<source-file>]+";
283 bpo::options_description desc(descstr.str());
286 bpo::value<stringvec>()->composing(),
287 "Only entities whose identifier (label (M), service type (S) " 288 "or process name (P)) match (multiple OK).")(
"help,h",
289 "this help message.")(
290 "modules,M",
"PsetType: print module configurations (default).")(
292 bpo::value<stringvec>()->composing(),
293 "source data file (multiple OK).")(
294 "services,S",
"PsetType: print service configurations.")(
295 "process,P",
"PsetType: print process configurations.");
296 bpo::options_description all_opts(
"All Options.");
300 bpo::positional_options_description pd;
301 pd.add(
"source", -1);
303 bpo::variables_map vm;
305 bpo::store(bpo::command_line_parser(argc, argv)
313 std::cerr <<
"Exception from command line processing in " << argv[0] <<
": " 317 if (vm.count(
"help")) {
318 std::cout << desc << std::endl;
324 if (vm.count(
"services")) {
326 }
else if (vm.count(
"process")) {
334 if (vm.count(
"filter")) {
335 cet::copy_all(vm[
"filter"].as<stringvec>(), std::back_inserter(filters));
340 size_t file_count = vm.count(
"source");
341 if (file_count < 1) {
342 cerr <<
"ERROR: One or more input files must be specified;" 343 <<
" supply filenames as program arguments\n" 344 <<
"For usage and options list, please do 'config_dumper --help'.\n";
347 file_names.reserve(file_count);
348 cet::copy_all(vm[
"source"].as<stringvec>(), std::back_inserter(file_names));
std::vector< std::string > stringvec
int print_psets_from_files(stringvec const &file_names, stringvec const &filters, PsetType const mode, ostream &output, ostream &errors)
auto copy_all(FwdCont &, FwdIter)