CMS 3D CMS Logo

DigiAccumulatorMixModFactory.cc
Go to the documentation of this file.
1 
6 
7 #include <iostream>
8 
10 
11 namespace edm {
13 
15 
17 
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
static DigiAccumulatorMixModFactory const singleInstance_
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
#define FDEBUG(lev)
Definition: DebugMacros.h:19
#define EDM_REGISTER_PLUGINFACTORY(_factory_, _category_)
Definition: PluginFactory.h:88
std::unique_ptr< DigiAccumulatorMixMod > makeDigiAccumulator(ParameterSet const &, ProducesCollector, ConsumesCollector &) const
HLT enums.
#define get
static DigiAccumulatorMixModFactory const * get()