FWCore
Sources
src
VectorInputSourceFactory.cc
Go to the documentation of this file.
1
2
#include "
FWCore/Sources/interface/VectorInputSourceDescription.h
"
3
#include "
FWCore/Sources/interface/VectorInputSourceFactory.h
"
4
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
5
#include "
FWCore/Utilities/interface/DebugMacros.h
"
6
#include "
FWCore/Utilities/interface/EDMException.h
"
7
8
#include <iostream>
9
10
EDM_REGISTER_PLUGINFACTORY
(
edm::VectorInputSourcePluginFactory
,
"CMS EDM Framework VectorInputSource"
);
11
12
namespace
edm
{
13
14
VectorInputSourceFactory::~VectorInputSourceFactory
() {}
15
16
VectorInputSourceFactory::VectorInputSourceFactory
() {}
17
18
VectorInputSourceFactory
const
VectorInputSourceFactory::singleInstance_
;
19
20
VectorInputSourceFactory
const
*
VectorInputSourceFactory::get
() {
21
// will not work with plugin factories
22
//static InputSourceFactory f;
23
//return &f;
24
25
return
&
singleInstance_
;
26
}
27
28
std::unique_ptr<VectorInputSource>
VectorInputSourceFactory::makeVectorInputSource
(
29
ParameterSet
const
& conf,
VectorInputSourceDescription
const
&
desc
)
const
{
30
std::string
modtype = conf.
getParameter
<
std::string
>(
"@module_type"
);
31
FDEBUG
(1) <<
"VectorInputSourceFactory: module_type = "
<< modtype << std::endl;
32
std::unique_ptr<VectorInputSource> wm(
VectorInputSourcePluginFactory::get
()->
create
(modtype, conf,
desc
));
33
34
if
(wm.get() ==
nullptr
) {
35
throw
edm::Exception
(
errors::Configuration
,
"NoSourceModule"
)
36
<<
"VectorInputSource Factory:\n"
37
<<
"Cannot find source type from ParameterSet: "
<< modtype <<
"\n"
38
<<
"Perhaps your source type is misspelled or is not an EDM Plugin?\n"
39
<<
"Try running EdmPluginDump to obtain a list of available Plugins."
;
40
}
41
42
FDEBUG
(1) <<
"VectorInputSourceFactory: created input source "
<< modtype << std::endl;
43
44
return
wm;
45
}
46
47
}
// namespace edm
edm::VectorInputSourceFactory::singleInstance_
static const VectorInputSourceFactory singleInstance_
Definition:
VectorInputSourceFactory.h:28
edm
HLT enums.
Definition:
AlignableModifier.h:19
edm::VectorInputSourceDescription
Definition:
VectorInputSourceDescription.h:18
beamerCreator.create
def create(alignables, pedeDump, additionalData, outputFile, config)
Definition:
beamerCreator.py:44
EDMException.h
edm::VectorInputSourceFactory::makeVectorInputSource
std::unique_ptr< VectorInputSource > makeVectorInputSource(ParameterSet const &, VectorInputSourceDescription const &) const
Definition:
VectorInputSourceFactory.cc:28
edm::VectorInputSourceFactory::VectorInputSourceFactory
VectorInputSourceFactory()
Definition:
VectorInputSourceFactory.cc:16
EDM_REGISTER_PLUGINFACTORY
#define EDM_REGISTER_PLUGINFACTORY(_factory_, _category_)
Definition:
PluginFactory.h:89
VectorInputSourceFactory.h
edm::ParameterSet
Definition:
ParameterSet.h:47
FDEBUG
#define FDEBUG(lev)
Definition:
DebugMacros.h:19
edmplugin::PluginFactory
Definition:
PluginFactory.h:34
edm::VectorInputSourceFactory
Definition:
VectorInputSourceFactory.h:17
get
#define get
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
submitPVResolutionJobs.desc
string desc
Definition:
submitPVResolutionJobs.py:251
Exception
Definition:
hltDiff.cc:245
VectorInputSourceDescription.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition:
ParameterSet.h:303
DebugMacros.h
ParameterSet.h
edm::errors::Configuration
Definition:
EDMException.h:36
edm::VectorInputSourceFactory::get
static VectorInputSourceFactory const * get()
Definition:
VectorInputSourceFactory.cc:20
edm::VectorInputSourceFactory::~VectorInputSourceFactory
~VectorInputSourceFactory()
Definition:
VectorInputSourceFactory.cc:14
Generated for CMSSW Reference Manual by
1.8.16