CMS 3D CMS Logo

RoadSearchHelixMaker.cc

Go to the documentation of this file.
00001 //
00002 // Package:         RecoTracker/RoadSearchHelixMaker
00003 // Class:           RoadSearchHelixMaker
00004 // 
00005 // Description:     Calls RoadSeachHelixMakerAlgorithm
00006 //                  to find RoadSearchClouds.
00007 //
00008 // Original Author: Steve Wagner, stevew@pizero.colorado.edu
00009 // Created:         Sat Feb 19 22:00:00 UTC 2006
00010 //
00011 // $Author: gutsche $
00012 // $Date: 2007/03/07 22:04:03 $
00013 // $Revision: 1.5 $
00014 //
00015 
00016 #include <memory>
00017 #include <string>
00018 
00019 #include "RecoTracker/RoadSearchHelixMaker/interface/RoadSearchHelixMaker.h"
00020 
00021 #include "DataFormats/TrackCandidate/interface/TrackCandidateCollection.h"
00022 
00023 #include "DataFormats/Common/interface/Handle.h"
00024 #include "FWCore/Framework/interface/ESHandle.h"
00025 #include "FWCore/Framework/interface/EventSetup.h"
00026 
00027 namespace cms
00028 {
00029 
00030   RoadSearchHelixMaker::RoadSearchHelixMaker(edm::ParameterSet const& conf) : 
00031     roadSearchHelixMakerAlgorithm_(conf) ,
00032     conf_(conf)
00033   {
00034     produces<reco::TrackCollection>();
00035   }
00036 
00037 
00038   // Virtual destructor needed.
00039   RoadSearchHelixMaker::~RoadSearchHelixMaker() { }  
00040 
00041   // Functions that gets called by framework every event
00042   void RoadSearchHelixMaker::produce(edm::Event& e, const edm::EventSetup& es)
00043   {
00044     // Step A: Get Inputs 
00045 
00046     // retrieve producer name of raw CloudCollection
00047     std::string trackCandidateProducer = conf_.getParameter<std::string>("TrackCandidateProducer");
00048     edm::Handle<TrackCandidateCollection> trackCandidates;
00049     e.getByLabel(trackCandidateProducer, trackCandidates);
00050 
00051     // Step B: create empty output collection
00052     std::auto_ptr<reco::TrackCollection> output(new reco::TrackCollection);
00053 
00054     // Step C: Invoke the cloud cleaning algorithm
00055     roadSearchHelixMakerAlgorithm_.run(trackCandidates.product(),es,*output);
00056 
00057     // Step D: write output to file
00058    e.put(output);
00059 
00060   }
00061 
00062 }

Generated on Tue Jun 9 17:45:40 2009 for CMSSW by  doxygen 1.5.4