CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Attributes
edm::InputSourceFactory Class Reference

#include <InputSourceFactory.h>

Public Member Functions

std::unique_ptr< InputSourcemakeInputSource (ParameterSet const &, InputSourceDescription const &) const
 
 ~InputSourceFactory ()
 

Static Public Member Functions

static InputSourceFactory const * get ()
 

Private Member Functions

 InputSourceFactory ()
 

Static Private Attributes

static const InputSourceFactory singleInstance_
 

Detailed Description

Definition at line 16 of file InputSourceFactory.h.

Constructor & Destructor Documentation

◆ ~InputSourceFactory()

edm::InputSourceFactory::~InputSourceFactory ( )

Definition at line 12 of file InputSourceFactory.cc.

12 {}

◆ InputSourceFactory()

edm::InputSourceFactory::InputSourceFactory ( )
private

Definition at line 14 of file InputSourceFactory.cc.

14 {}

Member Function Documentation

◆ get()

InputSourceFactory const * edm::InputSourceFactory::get ( )
static

◆ makeInputSource()

std::unique_ptr< InputSource > edm::InputSourceFactory::makeInputSource ( ParameterSet const &  conf,
InputSourceDescription const &  desc 
) const

Definition at line 26 of file InputSourceFactory.cc.

29  {
30  std::string modtype = conf.getParameter<std::string>("@module_type");
31  FDEBUG(1) << "InputSourceFactory: module_type = " << modtype << std::endl;
32  auto wm = InputSourcePluginFactory::get()->create(modtype, conf, desc);
33 
34  if (wm.get() == nullptr) {
35  throw edm::Exception(errors::Configuration, "NoSourceModule")
36  << "InputSource Factory:\n"
37  << "Cannot find source type from ParameterSet: " << modtype << "\n"
38  << "Perhaps your source type is misspelled or is not an EDM Plugin?\n"
39  << "Try running EdmPluginDump to obtain a list of available Plugins.";
40  }
41 
42  wm->registerProducts();
43 
44  FDEBUG(1) << "InputSourceFactory: created input source " << modtype << std::endl;
45 
46  return wm;
47  }

References edm::errors::Configuration, submitPVResolutionJobs::desc, Exception, FDEBUG, get, edm::ParameterSet::getParameter(), and AlCaHLTBitMon_QueryRunRegistry::string.

Member Data Documentation

◆ singleInstance_

const InputSourceFactory edm::InputSourceFactory::singleInstance_
staticprivate

Definition at line 26 of file InputSourceFactory.h.

Referenced by get().

edm::InputSourceFactory::singleInstance_
static const InputSourceFactory singleInstance_
Definition: InputSourceFactory.h:26
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
FDEBUG
#define FDEBUG(lev)
Definition: DebugMacros.h:19
get
#define get
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
Exception
Definition: hltDiff.cc:245
edm::errors::Configuration
Definition: EDMException.h:36