FWCore
PluginManager
src
PresenceFactory.cc
Go to the documentation of this file.
1
#include "
FWCore/PluginManager/interface/PresenceFactory.h
"
2
#include "
FWCore/Utilities/interface/EDMException.h
"
3
#include "
FWCore/Utilities/interface/DebugMacros.h
"
4
#include "
FWCore/Utilities/interface/thread_safety_macros.h
"
5
6
#include <iostream>
7
8
EDM_REGISTER_PLUGINFACTORY
(
edm::PresencePluginFactory
,
"CMS EDM Framework Presence"
);
9
10
namespace
edm
{
11
12
PresenceFactory::~PresenceFactory
() {}
13
14
PresenceFactory::PresenceFactory
() {}
15
16
PresenceFactory
*
PresenceFactory::get
() {
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
Generated for CMSSW Reference Manual by
1.8.16