CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
VectorInputSourceFactory.cc
Go to the documentation of this file.
1 
6 
7 #include <iostream>
8 
9 EDM_REGISTER_PLUGINFACTORY(edm::VectorInputSourcePluginFactory,"CMS EDM Framework VectorInputSource");
10 
11 namespace edm {
12 
14  }
15 
17  }
18 
20 
22  // will not work with plugin factories
23  //static InputSourceFactory f;
24  //return &f;
25 
26  return &singleInstance_;
27  }
28 
29  std::unique_ptr<VectorInputSource>
31  InputSourceDescription const& desc) const {
32  std::string modtype = conf.getParameter<std::string>("@module_type");
33  FDEBUG(1) << "VectorInputSourceFactory: module_type = " << modtype << std::endl;
34  std::unique_ptr<VectorInputSource> wm(VectorInputSourcePluginFactory::get()->create(modtype,conf,desc));
35 
36  if(wm.get() == nullptr) {
37  throw edm::Exception(errors::Configuration,"NoSourceModule")
38  << "VectorInputSource Factory:\n"
39  << "Cannot find source type from ParameterSet: "
40  << modtype << "\n"
41  << "Perhaps your source type is misspelled or is not an EDM Plugin?\n"
42  << "Try running EdmPluginDump to obtain a list of available Plugins.";
43  }
44 
45  FDEBUG(1) << "VectorInputSourceFactory: created input source "
46  << modtype
47  << std::endl;
48 
49  return wm;
50  }
51 
52 }
T getParameter(std::string const &) const
#define FDEBUG(lev)
Definition: DebugMacros.h:18
std::unique_ptr< VectorInputSource > makeVectorInputSource(ParameterSet const &, InputSourceDescription const &) const
static VectorInputSourceFactory const singleInstance_
tuple conf
Definition: dbtoconf.py:185
#define EDM_REGISTER_PLUGINFACTORY(_factory_, _category_)
Definition: PluginFactory.h:90
static VectorInputSourceFactory const * get()
SurfaceDeformation * create(int type, const std::vector< double > &params)
T get(const Candidate &c)
Definition: component.h:55