#include <InputSourceFactory.h>
Public Member Functions | |
std::auto_ptr< InputSource > | makeInputSource (ParameterSet const &, InputSourceDescription const &) const |
~InputSourceFactory () | |
Static Public Member Functions | |
static InputSourceFactory * | get () |
Private Member Functions | |
InputSourceFactory () | |
Static Private Attributes | |
static InputSourceFactory | singleInstance_ |
Definition at line 16 of file InputSourceFactory.h.
edm::InputSourceFactory::~InputSourceFactory | ( | ) |
Definition at line 13 of file InputSourceFactory.cc.
{ }
edm::InputSourceFactory::InputSourceFactory | ( | ) | [private] |
Definition at line 17 of file InputSourceFactory.cc.
{ }
InputSourceFactory * edm::InputSourceFactory::get | ( | void | ) | [static] |
Definition at line 23 of file InputSourceFactory.cc.
References singleInstance_.
Referenced by makeInputSource().
{ // will not work with plugin factories //static InputSourceFactory f; //return &f; return &singleInstance_; }
std::auto_ptr< InputSource > edm::InputSourceFactory::makeInputSource | ( | ParameterSet const & | conf, |
InputSourceDescription const & | desc | ||
) | const |
Definition at line 33 of file InputSourceFactory.cc.
References edm::errors::Configuration, Exception, FDEBUG, get(), and edm::ParameterSet::getParameter().
{ std::string modtype = conf.getParameter<std::string>("@module_type"); FDEBUG(1) << "InputSourceFactory: module_type = " << modtype << std::endl; std::auto_ptr<InputSource> wm; wm = std::auto_ptr<InputSource>(InputSourcePluginFactory::get()->create(modtype,conf,desc)); if(wm.get()==0) { throw edm::Exception(errors::Configuration,"NoSourceModule") << "InputSource Factory:\n" << "Cannot find source type from ParameterSet: " << modtype << "\n" << "Perhaps your source type is misspelled or is not an EDM Plugin?\n" << "Try running EdmPluginDump to obtain a list of available Plugins."; } wm->registerProducts(); FDEBUG(1) << "InputSourceFactory: created input source " << modtype << std::endl; return wm; }
InputSourceFactory edm::InputSourceFactory::singleInstance_ [static, private] |
Definition at line 29 of file InputSourceFactory.h.
Referenced by get().