#include "boost/program_options.hpp"
#include "cetlib_except/demangle.h"
#include "fhiclcpp/ParameterSet.h"
#include "fhiclcpp/detail/print_mode.h"
#include "fhiclcpp/intermediate_table.h"
#include "fhiclcpp/make_ParameterSet.h"
#include "fhiclcpp/parse.h"
#include <fstream>
#include <iostream>
#include <string>
Go to the source code of this file.
|
| int | main (int argc, char *argv[]) |
| |
| int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 54 of file fhicl-dump.cc.
References fhicl::detail::annotated, e, fhicl::make_ParameterSet(), fhicl::parse_document(), fhicl::detail::prefix_annotated, and fhicl::ParameterSet::to_indented_string().
59 opts = process_arguments(argc, argv);
62 if (e.category() == help)
64 if (e.category() == processing) {
65 std::cerr << e.what() <<
'\n';
68 if (e.category() == config) {
69 std::cerr << e.what() <<
'\n';
74 auto const policy = get_policy(opts.lookup_policy, opts.lookup_path);
78 pset = form_pset(opts.input_filename, *policy);
81 std::cerr << e.what() <<
'\n';
85 std::cerr <<
"Unknown exception\n";
92 std::ofstream ofs{opts.output_filename};
93 std::ostream& os = opts.output_filename.empty() ? std::cout : ofs;
95 os <<
"# Produced from '" << argv[0] <<
"' using:\n" 96 <<
"# Input : " << opts.input_filename <<
'\n' 98 << cet::demangle_symbol(
typeid(decltype(*policy)).name()) <<
'\n' 99 <<
"# Path : \"" << opts.lookup_path <<
"\"\n\n" std::string to_indented_string() const
cet::coded_exception< error, detail::translate > exception