CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EgammaHLTPixelMatchElectronProducers.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: EgammaHLTProducers
4 // Class: EgammaHLTPixelMatchElectronProducers
5 //
11 //
12 // Original Author: Monica Vazquez Acosta (CERN)
13 // $Id: EgammaHLTPixelMatchElectronProducers.cc,v 1.3 2009/01/28 17:07:00 ghezzi Exp $
14 //
15 //
16 
17 // user include files
22 
24 
26 
29 
30 #include <iostream>
31 
32 using namespace reco;
33 
35 
36  consumes<TrackCollection>(conf_.getParameter<edm::InputTag>("TrackProducer"));
37  consumes<GsfTrackCollection>(conf_.getParameter<edm::InputTag>("GsfTrackProducer"));
38  consumes<BeamSpot>(conf_.getParameter<edm::InputTag>("BSProducer"));
39 
40  //create algo
42 
43  //register your products
44  produces<ElectronCollection>();
45 }
46 
47 
49  delete algo_;
50 }
51 
53 
55  desc.add<edm::InputTag>(("TrackProducer"), edm::InputTag("hltEleAnyWP80CleanMergedTracks"));
56  desc.add<edm::InputTag>(("GsfTrackProducer"), edm::InputTag(""));
57  desc.add<bool>(("UseGsfTracks"), false);
58  desc.add<edm::InputTag>(("BSProducer"), edm::InputTag("hltOnlineBeamSpot"));
59  descriptions.add(("hltEgammaHLTPixelMatchElectronProducers"), desc);
60 }
61 
62 // ------------ method called to produce the data ------------
64  // Update the algorithm conditions
65  algo_->setupES(iSetup);
66 
67  // Create the output collections
68  std::auto_ptr<ElectronCollection> pOutEle(new ElectronCollection);
69 
70  // invoke algorithm
71  algo_->run(e,*pOutEle);
72 
73  // put result into the Event
74  e.put(pOutEle);
75 }
76 
77 
T getParameter(std::string const &) const
EgammaHLTPixelMatchElectronProducers(const edm::ParameterSet &conf)
void produce(edm::StreamID sid, edm::Event &e, const edm::EventSetup &c) const override
void run(edm::Event &, reco::ElectronCollection &)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:113
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
void setupES(const edm::EventSetup &setup)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
std::vector< Electron > ElectronCollection
collectin of Electron objects
Definition: ElectronFwd.h:9
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)