13 #include "cetlib/filepath_maker.h" 15 #include "boost/filesystem.hpp" 16 #include "boost/program_options.hpp" 21 namespace bpo = boost::program_options;
26 artapp(
int argc,
char* argv[],
bool report_unused)
30 if (
char const* fhicl_env = std::getenv(
"FHICL_FILE_PATH")) {
31 search_path =
string{fhicl_env};
33 cerr <<
"Expected environment variable FHICL_FILE_PATH is missing or " 34 "empty: using \".\"\n";
37 cet::filepath_first_absolute_or_lookup_with_dot lookupPolicy{search_path};
40 ostringstream descstr;
41 descstr <<
"\nUsage: " << boost::filesystem::path(argv[0]).filename().native()
42 <<
" <-c <config-file>> <other-options> [<source-file>]+\n\n" 44 bpo::options_description all_desc{descstr.str()};
48 handlers.emplace_back(
58 return art::run_art(argc, argv, all_desc, std::move(handlers));
std::vector< std::unique_ptr< art::OptionsHandler >> OptionsHandlers
int artapp(int argc, char *argv[], bool report_unused)
int run_art(int argc, char **argv, bpo::options_description &all_desc, OptionsHandlers &&handlers)