CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
L1ExtraMixer Class Reference

#include <L1ExtraMixer.h>

Inheritance diagram for L1ExtraMixer:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 L1ExtraMixer (const edm::ParameterSet &)
 
 ~L1ExtraMixer ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

virtual void produce (edm::Event &, const edm::EventSetup &)
 

Private Attributes

std::vector
< L1ExtraMixerPluginBase * > 
plugins_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Mix L1Extra e/mu/tau/jet and MET objects.

NOTE: All L1Extra collections need to be processed by one and the same module, in order to retain a unique label for all collections. The mixing if individual collections is implemented via plugins.

Author
Christian Veelken, LLR
Version
Revision:
1.1
Id:
L1ExtraMixer.h,v 1.1 2012/10/09 09:00:24 veelken Exp

Definition at line 29 of file L1ExtraMixer.h.

Constructor & Destructor Documentation

L1ExtraMixer::L1ExtraMixer ( const edm::ParameterSet cfg)
explicit

Definition at line 3 of file L1ExtraMixer.cc.

References reco::get(), edm::ParameterSet::getParameter(), edm::InputTag::label(), fwrapper::plugin, plugins_, edm::InputTag::process(), readCalibrations2004_v2_cff::src1, readConfiguration2006_v0_cff::src2, and AlCaHLTBitMon_QueryRunRegistry::string.

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 }
T getParameter(std::string const &) const
auto_ptr< JetDefinition::Plugin > plugin
std::vector< L1ExtraMixerPluginBase * > plugins_
Definition: L1ExtraMixer.h:38
std::string const & label() const
Definition: InputTag.h:42
std::string const & process() const
Definition: InputTag.h:46
T get(const Candidate &c)
Definition: component.h:55
L1ExtraMixer::~L1ExtraMixer ( )

Definition at line 24 of file L1ExtraMixer.cc.

References plugins_.

25 {
26  for ( std::vector<L1ExtraMixerPluginBase*>::iterator it = plugins_.begin();
27  it != plugins_.end(); ++it ) {
28  delete (*it);
29  }
30 }
std::vector< L1ExtraMixerPluginBase * > plugins_
Definition: L1ExtraMixer.h:38

Member Function Documentation

void L1ExtraMixer::produce ( edm::Event evt,
const edm::EventSetup es 
)
privatevirtual

Implements edm::EDProducer.

Definition at line 32 of file L1ExtraMixer.cc.

References fwrapper::plugin, and plugins_.

33 {
34  for ( std::vector<L1ExtraMixerPluginBase*>::iterator plugin = plugins_.begin();
35  plugin != plugins_.end(); ++plugin ) {
36  (*plugin)->produce(evt, es);
37  }
38 }
auto_ptr< JetDefinition::Plugin > plugin
std::vector< L1ExtraMixerPluginBase * > plugins_
Definition: L1ExtraMixer.h:38

Member Data Documentation

std::vector<L1ExtraMixerPluginBase*> L1ExtraMixer::plugins_
private

Definition at line 38 of file L1ExtraMixer.h.

Referenced by L1ExtraMixer(), produce(), and ~L1ExtraMixer().