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  class EDProducer;
13 
15  }
16 
18  }
19 
21 
23  // will not work with plugin factories
24  //static DigiAccumulatorMixModFactory f;
25  //return &f;
26 
27  return &singleInstance_;
28  }
29 
30  std::auto_ptr<DigiAccumulatorMixMod>
32  std::string accumulatorType = conf.getParameter<std::string>("accumulatorType");
33  FDEBUG(1) << "DigiAccumulatorMixModFactory: digi_accumulator_type = " << accumulatorType << std::endl;
34  std::auto_ptr<DigiAccumulatorMixMod> wm;
35  wm = std::auto_ptr<DigiAccumulatorMixMod>(DigiAccumulatorMixModPluginFactory::get()->create(accumulatorType, conf, mixMod));
36 
37  if(wm.get()==0) {
38  throw edm::Exception(errors::Configuration,"NoSourceModule")
39  << "DigiAccumulator Factory:\n"
40  << "Cannot find dig type from ParameterSet: "
41  << accumulatorType << "\n"
42  << "Perhaps your source type is misspelled or is not an EDM Plugin?\n"
43  << "Try running EdmPluginDump to obtain a list of available Plugins.";
44  }
45 
46  FDEBUG(1) << "DigiAccumulatorMixModFactory: created a Digi Accumulator "
47  << accumulatorType
48  << std::endl;
49 
50  return wm;
51  }
52 }
T getParameter(std::string const &) const
#define FDEBUG(lev)
Definition: DebugMacros.h:18
static DigiAccumulatorMixModFactory singleInstance_
static DigiAccumulatorMixModFactory * get()
tuple conf
Definition: dbtoconf.py:185
#define EDM_REGISTER_PLUGINFACTORY(_factory_, _category_)
Definition: PluginFactory.h:90
std::auto_ptr< DigiAccumulatorMixMod > makeDigiAccumulator(ParameterSet const &, EDProducer &) const
T get(const Candidate &c)
Definition: component.h:56