CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1ExtraMixer.cc
Go to the documentation of this file.
2 
4 {
7 
8  typedef std::vector<edm::ParameterSet> vParameterSet;
9  vParameterSet cfgPlugins = cfg.getParameter<vParameterSet>("collections");
10  for ( vParameterSet::iterator cfgPlugin = cfgPlugins.begin();
11  cfgPlugin != cfgPlugins.end(); ++cfgPlugin ) {
12  std::string pluginType = cfgPlugin->getParameter<std::string>("pluginType");
13  std::string instanceLabel = cfgPlugin->getParameter<std::string>("instanceLabel");
14  edm::InputTag src1withInstanceLabel(src1.label(), instanceLabel, src1.process());
15  cfgPlugin->addParameter<edm::InputTag>("src1", src1withInstanceLabel);
16  edm::InputTag src2withInstanceLabel(src2.label(), instanceLabel, src2.process());
17  cfgPlugin->addParameter<edm::InputTag>("src2", src2withInstanceLabel);
18  L1ExtraMixerPluginBase* plugin = L1ExtraMixerPluginFactory::get()->create(pluginType, *cfgPlugin);
19  plugin->registerProducts(*this);
20  plugins_.push_back(plugin);
21  }
22 }
23 
25 {
26  for ( std::vector<L1ExtraMixerPluginBase*>::iterator it = plugins_.begin();
27  it != plugins_.end(); ++it ) {
28  delete (*it);
29  }
30 }
31 
33 {
34  for ( std::vector<L1ExtraMixerPluginBase*>::iterator plugin = plugins_.begin();
35  plugin != plugins_.end(); ++plugin ) {
36  (*plugin)->produce(evt, es);
37  }
38 }
39 
41 
T getParameter(std::string const &) const
auto_ptr< JetDefinition::Plugin > plugin
virtual void produce(edm::Event &, const edm::EventSetup &)
Definition: L1ExtraMixer.cc:32
std::vector< L1ExtraMixerPluginBase * > plugins_
Definition: L1ExtraMixer.h:38
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
std::string const & label() const
Definition: InputTag.h:42
std::string const & process() const
Definition: InputTag.h:46
L1ExtraMixer(const edm::ParameterSet &)
Definition: L1ExtraMixer.cc:3
T get(const Candidate &c)
Definition: component.h:55