LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
art::InputSourceFactory Namespace Reference

Functions

std::unique_ptr< InputSourcemake (fhicl::ParameterSet const &conf, InputSourceDescription &desc)
 

Function Documentation

std::unique_ptr< InputSource > art::InputSourceFactory::make ( fhicl::ParameterSet const &  conf,
InputSourceDescription desc 
)

Definition at line 19 of file InputSourceFactory.cc.

References art::errors::Configuration, e, FDEBUG, fhicl::ParameterSet::get(), art::getReleaseVersion(), and art::Suffixes::source().

Referenced by proxy::details::WithAssociatedStructBase< Aux, Metadata, ArgTuple, ProxyMaker, AuxTag >::createAssnProxyMaker(), fhicl::decompose_fhicl(), evgen::MarleyParameterSetWalker::enter_sequence(), evgen::MarleyParameterSetWalker::enter_table(), art::EventProcessor::EventProcessor(), proxy::AssociatedDataProxyMaker< Main, Aux, Metadata, CollProxy, Tag >::make(), proxy::OneTo01DataProxyMaker< Main, Aux, Metadata, CollProxy, Tag >::make(), proxy::ParallelDataProxyMaker< Main, Aux, CollProxy, Tag, AuxColl >::make(), proxy::CollectionProxyMaker< Tracks >::make(), util::make_collection_reference(), fhicl::parse_file_and_fill_db(), and fhicl::ParameterSetRegistry::stageIn().

20  {
21  auto const libspec = conf.get<std::string>("module_type");
22  FDEBUG(1) << "InputSourceFactory: module_type = " << libspec << '\n';
23  using make_t = std::unique_ptr<InputSource>(fhicl::ParameterSet const&,
24  InputSourceDescription&);
25  make_t* symbol = nullptr;
26  try {
27  cet::LibraryManager lm_{Suffixes::source()};
28  lm_.getSymbolByLibspec(libspec, "make", symbol);
29  }
30  catch (Exception const& e) {
31  cet::detail::wrapLibraryManagerException(
32  e, "InputSource", libspec, getReleaseVersion());
33  }
34  if (symbol == nullptr) {
35  throw Exception(errors::Configuration, "BadPluginLibrary")
36  << "InputSource " << libspec
37  << " has internal symbol definition problems: consult an expert.";
38  }
39  auto wm = symbol(conf, desc);
40  FDEBUG(1) << "InputSourceFactory: created input source " << libspec << '\n';
41  return wm;
42  }
std::string const & getReleaseVersion()
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
#define FDEBUG(LEVEL)
Definition: DebugMacros.h:25
Float_t e
Definition: plot.C:35