SimGeneral
MixingModule
src
DigiAccumulatorMixModFactory.cc
Go to the documentation of this file.
1
2
#include "
SimGeneral/MixingModule/interface/DigiAccumulatorMixModFactory.h
"
3
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
4
#include "
FWCore/Utilities/interface/DebugMacros.h
"
5
#include "
FWCore/Utilities/interface/EDMException.h
"
6
7
#include <iostream>
8
9
EDM_REGISTER_PLUGINFACTORY
(
edm::DigiAccumulatorMixModPluginFactory
,
"DigiAccumulator"
);
10
11
namespace
edm
{
12
DigiAccumulatorMixModFactory::~DigiAccumulatorMixModFactory
() {}
13
14
DigiAccumulatorMixModFactory::DigiAccumulatorMixModFactory
() {}
15
16
DigiAccumulatorMixModFactory
const
DigiAccumulatorMixModFactory::singleInstance_
;
17
18
DigiAccumulatorMixModFactory
const
*
DigiAccumulatorMixModFactory::get
() {
19
// will not work with plugin factories
20
//static DigiAccumulatorMixModFactory f;
21
//return &f;
22
23
return
&
singleInstance_
;
24
}
25
26
std::unique_ptr<DigiAccumulatorMixMod>
DigiAccumulatorMixModFactory::makeDigiAccumulator
(
27
ParameterSet
const
& conf,
ProducesCollector
producesCollector,
ConsumesCollector
& iC)
const
{
28
std::string
accumulatorType
= conf.
getParameter
<
std::string
>(
"accumulatorType"
);
29
FDEBUG
(1) <<
"DigiAccumulatorMixModFactory: digi_accumulator_type = "
<<
accumulatorType
<< std::endl;
30
auto
wm =
DigiAccumulatorMixModPluginFactory::get
()->create(
accumulatorType
, conf, producesCollector, iC);
31
32
if
(wm.get() ==
nullptr
) {
33
throw
edm::Exception
(
errors::Configuration
,
"NoSourceModule"
)
34
<<
"DigiAccumulator Factory:\n"
35
<<
"Cannot find dig type from ParameterSet: "
<<
accumulatorType
<<
"\n"
36
<<
"Perhaps your source type is misspelled or is not an EDM Plugin?\n"
37
<<
"Try running EdmPluginDump to obtain a list of available Plugins."
;
38
}
39
40
FDEBUG
(1) <<
"DigiAccumulatorMixModFactory: created a Digi Accumulator "
<<
accumulatorType
<< std::endl;
41
42
return
wm;
43
}
44
}
// namespace edm
edm::DigiAccumulatorMixModFactory::DigiAccumulatorMixModFactory
DigiAccumulatorMixModFactory()
Definition:
DigiAccumulatorMixModFactory.cc:14
edm
HLT enums.
Definition:
AlignableModifier.h:19
EDMException.h
edm::DigiAccumulatorMixModFactory
Definition:
DigiAccumulatorMixModFactory.h:15
edm::DigiAccumulatorMixModFactory::singleInstance_
static const DigiAccumulatorMixModFactory singleInstance_
Definition:
DigiAccumulatorMixModFactory.h:27
EDM_REGISTER_PLUGINFACTORY
#define EDM_REGISTER_PLUGINFACTORY(_factory_, _category_)
Definition:
PluginFactory.h:89
recoTrackAccumulator_cfi.accumulatorType
accumulatorType
Definition:
recoTrackAccumulator_cfi.py:15
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition:
ParameterSet.h:36
FDEBUG
#define FDEBUG(lev)
Definition:
DebugMacros.h:19
edmplugin::PluginFactory
Definition:
PluginFactory.h:34
get
#define get
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
edm::ProducesCollector
Definition:
ProducesCollector.h:43
edm::DigiAccumulatorMixModFactory::~DigiAccumulatorMixModFactory
~DigiAccumulatorMixModFactory()
Definition:
DigiAccumulatorMixModFactory.cc:12
Exception
Definition:
hltDiff.cc:246
edm::DigiAccumulatorMixModFactory::makeDigiAccumulator
std::unique_ptr< DigiAccumulatorMixMod > makeDigiAccumulator(ParameterSet const &, ProducesCollector, ConsumesCollector &) const
Definition:
DigiAccumulatorMixModFactory.cc:26
DebugMacros.h
DigiAccumulatorMixModFactory.h
ParameterSet.h
edm::errors::Configuration
Definition:
EDMException.h:36
edm::ConsumesCollector
Definition:
ConsumesCollector.h:39
edm::DigiAccumulatorMixModFactory::get
static DigiAccumulatorMixModFactory const * get()
Definition:
DigiAccumulatorMixModFactory.cc:18
Generated for CMSSW Reference Manual by
1.8.16