CMS 3D CMS Logo

PresenceFactory.cc
Go to the documentation of this file.
5 
6 #include <iostream>
7 
9 
10 namespace edm {
11 
13  }
14 
16  }
17 
18 
20  CMS_THREAD_SAFE static PresenceFactory singleInstance_;
21  return &singleInstance_;
22  }
23 
24  std::unique_ptr<Presence>
26  makePresence(std::string const & presence_type) const {
27  std::unique_ptr<Presence> sp(PresencePluginFactory::get()->create(presence_type));
28 
29  if(sp.get()==nullptr) {
30  throw edm::Exception(errors::Configuration, "NoPresenceModule")
31  << "Presence Factory:\n"
32  << "Cannot find presence type: "
33  << presence_type << "\n"
34  << "Perhaps the name is misspelled or is not a Plugin?\n"
35  << "Try running EdmPluginDump to obtain a list of available Plugins.";
36  }
37 
38  FDEBUG(1) << "PresenceFactory: created presence "
39  << presence_type
40  << std::endl;
41 
42  return sp;
43  }
44 }
45 
def create(alignables, pedeDump, additionalData, outputFile, config)
#define FDEBUG(lev)
Definition: DebugMacros.h:20
#define CMS_THREAD_SAFE
#define EDM_REGISTER_PLUGINFACTORY(_factory_, _category_)
Definition: PluginFactory.h:91
static PresenceFactory * get()
HLT enums.
std::unique_ptr< Presence > makePresence(std::string const &presence_type) const
T get(const Candidate &c)
Definition: component.h:55