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::VectorInputSourceFactory Class Reference

#include <VectorInputSourceFactory.h>

Public Member Functions

std::auto_ptr< VectorInputSourcemakeVectorInputSource (ParameterSet const &, InputSourceDescription const &) const
 
 ~VectorInputSourceFactory ()
 

Static Public Member Functions

static VectorInputSourceFactoryget ()
 

Private Member Functions

 VectorInputSourceFactory ()
 

Static Private Attributes

static VectorInputSourceFactory singleInstance_
 

Detailed Description

Definition at line 17 of file VectorInputSourceFactory.h.

Constructor & Destructor Documentation

edm::VectorInputSourceFactory::~VectorInputSourceFactory ( )

Definition at line 13 of file VectorInputSourceFactory.cc.

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

Definition at line 17 of file VectorInputSourceFactory.cc.

18  {
19  }

Member Function Documentation

VectorInputSourceFactory * edm::VectorInputSourceFactory::get ( void  )
static

Definition at line 23 of file VectorInputSourceFactory.cc.

References singleInstance_.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), and betterConfigParser.BetterConfigParser::getResultingSection().

24  {
25  // will not work with plugin factories
26  //static InputSourceFactory f;
27  //return &f;
28 
29  return &singleInstance_;
30  }
static VectorInputSourceFactory singleInstance_
std::auto_ptr< VectorInputSource > edm::VectorInputSourceFactory::makeVectorInputSource ( ParameterSet const &  conf,
InputSourceDescription const &  desc 
) const

Definition at line 33 of file VectorInputSourceFactory.cc.

References edm::errors::Configuration, SurfaceDeformationFactory::create(), edm::hlt::Exception, FDEBUG, reco::get(), and edm::ParameterSet::getParameter().

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  }
#define FDEBUG(lev)
Definition: DebugMacros.h:18
tuple conf
Definition: dbtoconf.py:185
SurfaceDeformation * create(int type, const std::vector< double > &params)
T get(const Candidate &c)
Definition: component.h:56

Member Data Documentation

VectorInputSourceFactory edm::VectorInputSourceFactory::singleInstance_
staticprivate

Definition at line 29 of file VectorInputSourceFactory.h.

Referenced by get().