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  }
16 
18  {
19  }
20 
22 
24  {
25  // will not work with plugin factories
26  //static InputSourceFactory f;
27  //return &f;
28 
29  return &singleInstance_;
30  }
31 
32  std::auto_ptr<VectorInputSource>
34  InputSourceDescription const& desc) const
35 
36  {
37  std::string modtype = conf.getParameter<std::string>("@module_type");
38  FDEBUG(1) << "VectorInputSourceFactory: module_type = " << modtype << std::endl;
39  std::auto_ptr<VectorInputSource> wm(VectorInputSourcePluginFactory::get()->create(modtype,conf,desc));
40 
41  if(wm.get()==0)
42  {
43  throw edm::Exception(errors::Configuration,"NoSourceModule")
44  << "VectorInputSource 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  FDEBUG(1) << "VectorInputSourceFactory: created input source "
52  << modtype
53  << std::endl;
54 
55  return wm;
56  }
57 
58 }
T getParameter(std::string const &) const
static VectorInputSourceFactory singleInstance_
#define FDEBUG(lev)
Definition: DebugMacros.h:18
tuple conf
Definition: dbtoconf.py:185
#define EDM_REGISTER_PLUGINFACTORY(_factory_, _category_)
static VectorInputSourceFactory * get()
std::auto_ptr< VectorInputSource > makeVectorInputSource(ParameterSet const &, InputSourceDescription const &) const
SurfaceDeformation * create(int type, const std::vector< double > &params)
T get(const Candidate &c)
Definition: component.h:56