CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PresenceFactory.cc
Go to the documentation of this file.
4 
5 #include <iostream>
6 
7 EDM_REGISTER_PLUGINFACTORY(edm::PresencePluginFactory,"CMS EDM Framework Presence");
8 
9 namespace edm {
10 
12  }
13 
15  }
16 
17 
19  static PresenceFactory singleInstance_;
20  return &singleInstance_;
21  }
22 
23  std::auto_ptr<Presence>
25  makePresence(std::string const & presence_type) const {
26  std::auto_ptr<Presence> sp(PresencePluginFactory::get()->create(presence_type));
27 
28  if(sp.get()==0) {
29  throw edm::Exception(errors::Configuration, "NoPresenceModule")
30  << "Presence Factory:\n"
31  << "Cannot find presence type: "
32  << presence_type << "\n"
33  << "Perhaps the name is misspelled or is not a Plugin?\n"
34  << "Try running EdmPluginDump to obtain a list of available Plugins.";
35  }
36 
37  FDEBUG(1) << "PresenceFactory: created presence "
38  << presence_type
39  << std::endl;
40 
41  return sp;
42  }
43 }
44 
#define FDEBUG(lev)
Definition: DebugMacros.h:18
#define EDM_REGISTER_PLUGINFACTORY(_factory_, _category_)
Definition: PluginFactory.h:90
static PresenceFactory * get()
std::auto_ptr< Presence > makePresence(std::string const &presence_type) const
SurfaceDeformation * create(int type, const std::vector< double > &params)
T get(const Candidate &c)
Definition: component.h:56