#include "BasicOutputOptionsHandler.h"
Definition at line 12 of file BasicOutputOptionsHandler.h.
art::BasicOutputOptionsHandler::BasicOutputOptionsHandler |
( |
bpo::options_description & |
desc | ) |
|
|
explicit |
Definition at line 32 of file BasicOutputOptionsHandler.cc.
References art::add_opt().
35 bpo::options_description output_options{
"Output options"};
36 auto options = output_options.add_options();
39 bpo::value<std::string>(),
40 "File name for TFileService.");
44 bpo::value<std::string>(&
tmpDir_),
45 "Temporary directory for in-progress output files (defaults to directory " 46 "of specified output file names).");
49 bpo::value<std::string>(&
tmpDir_),
50 "Synonym for --tmpdir.");
53 bpo::value<stringvec>()->composing(),
54 "Event output stream file (optionally specify stream with " 55 "stream-label:fileName in which case multiples are OK).");
56 add_opt(options,
"no-output",
"Disable all output streams.");
57 desc.add(output_options);
void add_opt(T &t, Args &&...args)
int art::OptionsHandler::checkOptions |
( |
bpo::variables_map const & |
vm | ) |
|
|
inherited |
Definition at line 51 of file OptionsHandler.cc.
53 std::string
const thisClass(cet::demangle_symbol(
typeid(*this).name()));
54 return exceptionCatcher([&vm,
this] {
return doCheckOptions(vm); },
55 thisClass +
"::doCheckOptions()",
virtual int doCheckOptions(bpo::variables_map const &vm)=0
int art::BasicOutputOptionsHandler::doCheckOptions |
( |
bpo::variables_map const & |
vm | ) |
|
|
overrideprivatevirtual |
Implements art::OptionsHandler.
Definition at line 61 of file BasicOutputOptionsHandler.cc.
References art::errors::Configuration, e, art::ensureTable(), fhicl::intermediate_table::erase(), art::detail::exists_outside_prolog(), fhicl::intermediate_table::get(), n, fhicl::intermediate_table::put(), s, fhicl::SEQUENCE, art::setRootErrorHandler(), and util::flags::to_string().
int art::BasicOutputOptionsHandler::doProcessOptions |
( |
bpo::variables_map const & |
vm, |
|
|
fhicl::intermediate_table & |
raw_config |
|
) |
| |
|
overrideprivatevirtual |
Implements art::OptionsHandler.
Definition at line 240 of file BasicOutputOptionsHandler.cc.
References art::completeRootHandlers(), art::detail::exists_outside_prolog(), art::detail::fhicl_key(), fhicl::intermediate_table::get(), art::module, fhicl::intermediate_table::put(), art::service, art::detail::supports_key(), and art::unloadRootSigHandler().
245 if (vm.count(
"TFileName") == 1) {
246 std::string tFileName(vm[
"TFileName"].as<std::string>());
247 std::string
const& key{
"services.TFileService"};
249 raw_config.
get<
table_t const&>(key).empty()) {
250 tFileName =
"hist.root";
252 if (!tFileName.empty()) {
253 raw_config.
put(key +
".fileName", tFileName);
257 processFileOutputOptions(vm, raw_config);
260 std::string
const& tfile_key =
fhicl_key(
"services",
"TFileService");
268 std::string
const outputs_stem{
"outputs"};
270 auto const& table = raw_config.
get<
table_t const&>(outputs_stem);
271 for (
auto const& output : table) {
272 auto const& module_label =
fhicl_key(outputs_stem, output.first);
273 auto const& module_type =
fhicl_key(module_label,
"module_type");
277 auto const& spec = raw_config.
get<std::string>(module_type);
287 auto const unload_key =
fhicl_key(
"scheduler",
"unloadRootSigHandler");
288 auto const unloadRSHandler =
290 raw_config.
get<
bool>(unload_key) :
292 if (unloadRSHandler) {
296 auto const reset_key =
fhicl_key(
"scheduler",
"resetRootErrHandler");
297 auto const maybe_reset =
299 raw_config.
get<
bool>(reset_key) :
301 RootErrorHandlerSentry re_sentry{maybe_reset};
bool exists_outside_prolog(fhicl::intermediate_table const &config, std::string const &key)
void unloadRootSigHandler()
std::enable_if_t< std::is_convertible< T, std::string >::value, std::string > fhicl_key(T const &name)
void completeRootHandlers()
bool supports_key(suffix_type st, std::string const &spec, std::string const &key)
Definition at line 60 of file OptionsHandler.cc.
Referenced by art::run_art_string_config().
63 std::string
const thisClass(cet::demangle_symbol(
typeid(*this).name()));
64 return exceptionCatcher(
66 thisClass +
"::doProcessOptions()",
virtual int doProcessOptions(bpo::variables_map const &vm, fhicl::intermediate_table &raw_config)=0
std::string art::BasicOutputOptionsHandler::tmpDir_ {} |
|
private |
The documentation for this class was generated from the following files: