Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
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
Exception
Definition:
hltDiff.cc:245
PresenceFactory.h
edm::PresenceFactory
Definition:
PresenceFactory.h:15
thread_safety_macros.h
beamerCreator.create
def create
Definition:
beamerCreator.py:44
FDEBUG
#define FDEBUG(lev)
Definition:
DebugMacros.h:19
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
edm::errors::Configuration
Definition:
EDMException.h:36
edm::PresenceFactory::PresenceFactory
PresenceFactory()
Definition:
PresenceFactory.cc:14
EDMException.h
edmplugin::PluginFactory
Definition:
PluginFactory.h:34
edm::PresenceFactory::~PresenceFactory
~PresenceFactory()
Definition:
PresenceFactory.cc:12
CMS_THREAD_SAFE
#define CMS_THREAD_SAFE
EDM_REGISTER_PLUGINFACTORY
#define EDM_REGISTER_PLUGINFACTORY(_factory_, _category_)
Definition:
PluginFactory.h:89
edm::PresenceFactory::get
static PresenceFactory * get()
Definition:
PresenceFactory.cc:16
get
#define get
edm::PresenceFactory::makePresence
std::unique_ptr< Presence > makePresence(std::string const &presence_type) const
Definition:
PresenceFactory.cc:21
DebugMacros.h
Generated for CMSSW Reference Manual by
1.8.5