CMS 3D CMS Logo

DigiAccumulatorMixModFactory.cc
Go to the documentation of this file.
1 
6 
7 #include <iostream>
8 
10 
11 namespace edm {
13  }
14 
16  }
17 
19 
21  // will not work with plugin factories
22  //static DigiAccumulatorMixModFactory f;
23  //return &f;
24 
25  return &singleInstance_;
26  }
27 
28  std::unique_ptr<DigiAccumulatorMixMod>
30  std::string accumulatorType = conf.getParameter<std::string>("accumulatorType");
31  FDEBUG(1) << "DigiAccumulatorMixModFactory: digi_accumulator_type = " << accumulatorType << std::endl;
32  std::unique_ptr<DigiAccumulatorMixMod> wm;
33  wm = std::unique_ptr<DigiAccumulatorMixMod>(DigiAccumulatorMixModPluginFactory::get()->create(accumulatorType, conf, mixMod, iC));
34 
35  if(wm.get()==nullptr) {
36  throw edm::Exception(errors::Configuration,"NoSourceModule")
37  << "DigiAccumulator Factory:\n"
38  << "Cannot find dig type from ParameterSet: "
39  << accumulatorType << "\n"
40  << "Perhaps your source type is misspelled or is not an EDM Plugin?\n"
41  << "Try running EdmPluginDump to obtain a list of available Plugins.";
42  }
43 
44  FDEBUG(1) << "DigiAccumulatorMixModFactory: created a Digi Accumulator "
45  << accumulatorType
46  << std::endl;
47 
48  return wm;
49  }
50 }
T getParameter(std::string const &) const
static DigiAccumulatorMixModFactory const singleInstance_
#define FDEBUG(lev)
Definition: DebugMacros.h:20
#define EDM_REGISTER_PLUGINFACTORY(_factory_, _category_)
Definition: PluginFactory.h:92
HLT enums.
std::unique_ptr< DigiAccumulatorMixMod > makeDigiAccumulator(ParameterSet const &, ProducerBase &, ConsumesCollector &) const
static DigiAccumulatorMixModFactory const * get()
T get(const Candidate &c)
Definition: component.h:55