CMS 3D CMS Logo

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.2 2007/10/16 09:13:48 ghezzi 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 #include "RecoEgamma/EgammaHLTAlgos/interface/EgammaHLTPixelMatchElectronAlgo.h"
00027 #include "DataFormats/EgammaReco/interface/ElectronPixelSeedFwd.h"
00028 #include "DataFormats/EgammaReco/interface/ElectronPixelSeed.h"
00029 #include "DataFormats/TrackReco/interface/TrackFwd.h"
00030 #include "DataFormats/TrackReco/interface/TrackExtraFwd.h"
00031 #include "DataFormats/TrackReco/interface/Track.h"
00032 #include "DataFormats/TrackCandidate/interface/TrackCandidateCollection.h"
00033 #include "DataFormats/TrackingRecHit/interface/TrackingRecHitFwd.h"
00034 #include "DataFormats/EgammaCandidates/interface/ElectronFwd.h"
00035 #include "DataFormats/EgammaCandidates/interface/Electron.h"
00036 
00037 #include <iostream>
00038 
00039 using namespace reco;
00040  
00041 EgammaHLTPixelMatchElectronProducers::EgammaHLTPixelMatchElectronProducers(const edm::ParameterSet& iConfig) : conf_(iConfig)
00042 {
00043   //register your products
00044   produces<ElectronCollection>();
00045 
00046   //create algo
00047   algo_ = new EgammaHLTPixelMatchElectronAlgo();
00048 
00049 }
00050 
00051 
00052 EgammaHLTPixelMatchElectronProducers::~EgammaHLTPixelMatchElectronProducers()
00053 {
00054   delete algo_;
00055 }
00056 
00057 void EgammaHLTPixelMatchElectronProducers::beginJob(edm::EventSetup const&iSetup) 
00058 {     
00059   algo_->setupES(iSetup,conf_);  
00060 }
00061 
00062 // ------------ method called to produce the data  ------------
00063 void EgammaHLTPixelMatchElectronProducers::produce(edm::Event& e, const edm::EventSetup& iSetup) 
00064 {
00065 
00066   // Create the output collections   
00067   std::auto_ptr<ElectronCollection> pOutEle(new ElectronCollection);
00068   
00069   // invoke algorithm
00070     algo_->run(e,*pOutEle);
00071 
00072   // put result into the Event
00073     e.put(pOutEle);
00074   
00075 }
00076 
00077 

Generated on Tue Jun 9 17:43:23 2009 for CMSSW by  doxygen 1.5.4