CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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::auto_ptr< InputSourcemakeInputSource (ParameterSet const &, InputSourceDescription const &) const
 
 ~InputSourceFactory ()
 

Static Public Member Functions

static InputSourceFactory const * get ()
 

Private Member Functions

 InputSourceFactory ()
 

Static Private Attributes

static InputSourceFactory const singleInstance_
 

Detailed Description

Definition at line 16 of file InputSourceFactory.h.

Constructor & Destructor Documentation

edm::InputSourceFactory::~InputSourceFactory ( )

Definition at line 13 of file InputSourceFactory.cc.

14  {
15  }
edm::InputSourceFactory::InputSourceFactory ( )
private

Definition at line 17 of file InputSourceFactory.cc.

18  {
19  }

Member Function Documentation

InputSourceFactory const * edm::InputSourceFactory::get ( )
static
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, reco::get(), edm::ParameterSet::getParameter(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by edm::makeInput().

36  {
37  std::string modtype = conf.getParameter<std::string>("@module_type");
38  FDEBUG(1) << "InputSourceFactory: module_type = " << modtype << std::endl;
39  std::auto_ptr<InputSource> wm;
40  wm = std::auto_ptr<InputSource>(InputSourcePluginFactory::get()->create(modtype,conf,desc));
41 
42  if(wm.get()==0) {
43  throw edm::Exception(errors::Configuration,"NoSourceModule")
44  << "InputSource Factory:\n"
45  << "Cannot find source type from ParameterSet: "
46  << modtype << "\n"
47  << "Perhaps your source type is misspelled or is not an EDM Plugin?\n"
48  << "Try running EdmPluginDump to obtain a list of available Plugins.";
49  }
50 
51  wm->registerProducts();
52 
53  FDEBUG(1) << "InputSourceFactory: created input source "
54  << modtype
55  << std::endl;
56 
57  return wm;
58  }
#define FDEBUG(lev)
Definition: DebugMacros.h:18
T get(const Candidate &c)
Definition: component.h:55

Member Data Documentation

InputSourceFactory const edm::InputSourceFactory::singleInstance_
staticprivate

Definition at line 29 of file InputSourceFactory.h.

Referenced by get().