Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
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
5
#include <iostream>
6
7
EDM_REGISTER_PLUGINFACTORY
(
edm::PresencePluginFactory
,
"CMS EDM Framework Presence"
);
8
9
namespace
edm {
10
11
PresenceFactory::~PresenceFactory
() {
12
}
13
14
PresenceFactory::PresenceFactory
() {
15
}
16
17
18
PresenceFactory
*
PresenceFactory::get
() {
19
[[cms::thread_safe]]
static
PresenceFactory
singleInstance_;
20
return
&singleInstance_;
21
}
22
23
std::unique_ptr<Presence>
24
PresenceFactory::
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
Exception
Definition:
hltDiff.cc:291
PresenceFactory.h
edm::PresenceFactory
Definition:
PresenceFactory.h:15
beamerCreator.create
def create
Definition:
beamerCreator.py:47
FDEBUG
#define FDEBUG(lev)
Definition:
DebugMacros.h:18
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
edm::errors::Configuration
Definition:
EDMException.h:37
edm::PresenceFactory::PresenceFactory
PresenceFactory()
Definition:
PresenceFactory.cc:14
EDMException.h
edmplugin::PluginFactory
Definition:
PluginFactory.h:31
edm::PresenceFactory::~PresenceFactory
~PresenceFactory()
Definition:
PresenceFactory.cc:11
EDM_REGISTER_PLUGINFACTORY
#define EDM_REGISTER_PLUGINFACTORY(_factory_, _category_)
Definition:
PluginFactory.h:90
edm::PresenceFactory::get
static PresenceFactory * get()
Definition:
PresenceFactory.cc:18
sp
Definition:
sp.h:21
edm::PresenceFactory::makePresence
std::unique_ptr< Presence > makePresence(std::string const &presence_type) const
Definition:
PresenceFactory.cc:25
DebugMacros.h
reco::get
T get(const Candidate &c)
Definition:
component.h:55
Generated for CMSSW Reference Manual by
1.8.5