CMS 3D CMS Logo

PresenceFactory.cc
Go to the documentation of this file.
5 
6 #include <iostream>
7 
9 
10 namespace edm {
11 
13 
15 
17  CMS_THREAD_SAFE static PresenceFactory singleInstance_;
18  return &singleInstance_;
19  }
20 
21  std::unique_ptr<Presence> PresenceFactory::makePresence(std::string const& presence_type) const {
22  std::unique_ptr<Presence> sp(PresencePluginFactory::get()->create(presence_type));
23 
24  if (sp.get() == nullptr) {
25  throw edm::Exception(errors::Configuration, "NoPresenceModule")
26  << "Presence Factory:\n"
27  << "Cannot find presence type: " << presence_type << "\n"
28  << "Perhaps the name is misspelled or is not a Plugin?\n"
29  << "Try running EdmPluginDump to obtain a list of available Plugins.";
30  }
31 
32  FDEBUG(1) << "PresenceFactory: created presence " << presence_type << std::endl;
33 
34  return sp;
35  }
36 } // namespace edm
edm::PresenceFactory::PresenceFactory
PresenceFactory()
Definition: PresenceFactory.cc:14
edm
HLT enums.
Definition: AlignableModifier.h:19
beamerCreator.create
def create(alignables, pedeDump, additionalData, outputFile, config)
Definition: beamerCreator.py:44
EDMException.h
edm::PresenceFactory::~PresenceFactory
~PresenceFactory()
Definition: PresenceFactory.cc:12
edm::PresenceFactory
Definition: PresenceFactory.h:15
CMS_THREAD_SAFE
#define CMS_THREAD_SAFE
Definition: thread_safety_macros.h:4
EDM_REGISTER_PLUGINFACTORY
#define EDM_REGISTER_PLUGINFACTORY(_factory_, _category_)
Definition: PluginFactory.h:89
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::PresenceFactory::makePresence
std::unique_ptr< Presence > makePresence(std::string const &presence_type) const
Definition: PresenceFactory.cc:21
FDEBUG
#define FDEBUG(lev)
Definition: DebugMacros.h:19
edmplugin::PluginFactory
Definition: PluginFactory.h:34
PresenceFactory.h
thread_safety_macros.h
get
#define get
edm::PresenceFactory::get
static PresenceFactory * get()
Definition: PresenceFactory.cc:16
Exception
Definition: hltDiff.cc:246
DebugMacros.h
edm::errors::Configuration
Definition: EDMException.h:36