CMS 3D CMS Logo

PresenceFactory.cc
Go to the documentation of this file.
4 
5 #include <iostream>
6 
8 
9 namespace edm {
10 
12  }
13 
15  }
16 
17 
19  [[cms::thread_safe]] static PresenceFactory singleInstance_;
20  return &singleInstance_;
21  }
22 
23  std::unique_ptr<Presence>
25  makePresence(std::string const & presence_type) const {
26  std::unique_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 
def create(alignables, pedeDump, additionalData, outputFile, config)
#define FDEBUG(lev)
Definition: DebugMacros.h:18
#define EDM_REGISTER_PLUGINFACTORY(_factory_, _category_)
Definition: PluginFactory.h:90
static PresenceFactory * get()
HLT enums.
Definition: sp.h:21
std::unique_ptr< Presence > makePresence(std::string const &presence_type) const
T get(const Candidate &c)
Definition: component.h:55