CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DigiAccumulatorMixModFactory.cc
Go to the documentation of this file.
1 
6 
7 #include <iostream>
8 
10 
11 namespace edm {
12  namespace one {
13  class EDProducerBase;
14  }
15 
17  }
18 
20  }
21 
23 
25  // will not work with plugin factories
26  //static DigiAccumulatorMixModFactory f;
27  //return &f;
28 
29  return &singleInstance_;
30  }
31 
32  std::auto_ptr<DigiAccumulatorMixMod>
34  std::string accumulatorType = conf.getParameter<std::string>("accumulatorType");
35  FDEBUG(1) << "DigiAccumulatorMixModFactory: digi_accumulator_type = " << accumulatorType << std::endl;
36  std::auto_ptr<DigiAccumulatorMixMod> wm;
37  wm = std::auto_ptr<DigiAccumulatorMixMod>(DigiAccumulatorMixModPluginFactory::get()->create(accumulatorType, conf, mixMod, iC));
38 
39  if(wm.get()==0) {
40  throw edm::Exception(errors::Configuration,"NoSourceModule")
41  << "DigiAccumulator Factory:\n"
42  << "Cannot find dig type from ParameterSet: "
43  << accumulatorType << "\n"
44  << "Perhaps your source type is misspelled or is not an EDM Plugin?\n"
45  << "Try running EdmPluginDump to obtain a list of available Plugins.";
46  }
47 
48  FDEBUG(1) << "DigiAccumulatorMixModFactory: created a Digi Accumulator "
49  << accumulatorType
50  << std::endl;
51 
52  return wm;
53  }
54 }
T getParameter(std::string const &) const
static DigiAccumulatorMixModFactory const singleInstance_
#define FDEBUG(lev)
Definition: DebugMacros.h:18
#define EDM_REGISTER_PLUGINFACTORY(_factory_, _category_)
Definition: PluginFactory.h:90
std::auto_ptr< DigiAccumulatorMixMod > makeDigiAccumulator(ParameterSet const &, stream::EDProducerBase &, ConsumesCollector &) const
static DigiAccumulatorMixModFactory const * get()
T get(const Candidate &c)
Definition: component.h:55