CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_8_patch3/src/RecoEgamma/EgammaHLTProducers/src/EgammaHLTPixelMatchElectronProducers.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // Package:    EgammaHLTProducers
00004 // Class:      EgammaHLTPixelMatchElectronProducers
00005 // 
00011 //
00012 // Original Author: Monica Vazquez Acosta (CERN)
00013 // $Id: EgammaHLTPixelMatchElectronProducers.cc,v 1.4 2009/10/14 14:32:24 covarell Exp $
00014 //
00015 //
00016 
00017 // user include files
00018 #include "FWCore/Framework/interface/Frameworkfwd.h"
00019 #include "FWCore/Framework/interface/EDProducer.h"
00020 #include "FWCore/Framework/interface/Event.h"
00021 #include "FWCore/Framework/interface/MakerMacros.h"
00022 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00023 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00024 
00025 #include "RecoEgamma/EgammaHLTProducers/interface/EgammaHLTPixelMatchElectronProducers.h"
00026 
00027 #include "RecoEgamma/EgammaHLTAlgos/interface/EgammaHLTPixelMatchElectronAlgo.h"/*
00028 //#include "DataFormats/EgammaReco/interface/ElectronPixelSeedFwd.h"
00029 //#include "DataFormats/EgammaReco/interface/ElectronPixelSeed.h"
00030 #include "DataFormats/TrackReco/interface/TrackFwd.h"
00031 #include "DataFormats/TrackReco/interface/TrackExtraFwd.h"
00032 #include "DataFormats/TrackReco/interface/Track.h"
00033 #include "DataFormats/TrackCandidate/interface/TrackCandidateCollection.h"
00034 #include "DataFormats/TrackingRecHit/interface/TrackingRecHitFwd.h"
00035 */
00036 #include "DataFormats/EgammaCandidates/interface/ElectronFwd.h"
00037 #include "DataFormats/EgammaCandidates/interface/Electron.h"
00038 
00039 #include <iostream>
00040 
00041 using namespace reco;
00042  
00043 EgammaHLTPixelMatchElectronProducers::EgammaHLTPixelMatchElectronProducers(const edm::ParameterSet& iConfig) : conf_(iConfig)
00044 {
00045   //register your products
00046   produces<ElectronCollection>();
00047 
00048   //create algo
00049   algo_ = new EgammaHLTPixelMatchElectronAlgo(conf_);
00050 
00051 }
00052 
00053 
00054 EgammaHLTPixelMatchElectronProducers::~EgammaHLTPixelMatchElectronProducers()
00055 {
00056   delete algo_;
00057 }
00058 
00059 void EgammaHLTPixelMatchElectronProducers::beginJob() 
00060 {     
00061 }
00062 
00063 // ------------ method called to produce the data  ------------
00064 void EgammaHLTPixelMatchElectronProducers::produce(edm::Event& e, const edm::EventSetup& iSetup) 
00065 {
00066   // Update the algorithm conditions
00067   algo_->setupES(iSetup);  
00068 
00069   // Create the output collections   
00070   std::auto_ptr<ElectronCollection> pOutEle(new ElectronCollection);
00071   
00072   // invoke algorithm
00073     algo_->run(e,*pOutEle);
00074 
00075   // put result into the Event
00076     e.put(pOutEle);
00077   
00078 }
00079 
00080