CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RoadSearchTrackCandidateMaker.cc
Go to the documentation of this file.
1 //
2 // Package: RecoTracker/RoadSearchTrackCandidateMaker
3 // Class: RoadSearchTrackCandidateMaker
4 //
5 // Description: Calls RoadSeachTrackCandidateMakerAlgorithm
6 // to convert cleaned clouds into
7 // TrackCandidates using the
8 // TrajectoryBuilder framework
9 //
10 // Original Author: Oliver Gutsche, gutsche@fnal.gov
11 // Created: Wed Mar 15 13:00:00 UTC 2006
12 //
13 // $Author: gutsche $
14 // $Date: 2007/07/08 20:32:40 $
15 // $Revision: 1.5 $
16 //
17 
18 #include <memory>
19 #include <string>
20 
22 
26 
30 
32  roadSearchTrackCandidateMakerAlgorithm_(conf) ,
33  conf_(conf)
34 {
35  produces<TrackCandidateCollection>();
36 
37  cloudProducer_ = conf_.getParameter<edm::InputTag>("CloudProducer");
38 
39 }
40 
41 
42 // Virtual destructor needed.
44 
45 // Functions that gets called by framework every event
47 {
48  // Step A: Get Inputs
49 
50 
51  // retrieve producer name of raw CloudCollection
53  e.getByLabel(cloudProducer_, cloudHandle);
54  const RoadSearchCloudCollection *clouds = cloudHandle.product();
55 
56  // Step B: create empty output collection
57  std::auto_ptr<TrackCandidateCollection> output(new TrackCandidateCollection);
58 
59  // Step C: Invoke the cloud cleaning algorithm
60  roadSearchTrackCandidateMakerAlgorithm_.run(clouds,e,es,*output);
61 
62  // Step D: write output to file
63  e.put(output);
64 
65 }
T getParameter(std::string const &) const
RoadSearchTrackCandidateMaker(const edm::ParameterSet &conf)
RoadSearchTrackCandidateMakerAlgorithm roadSearchTrackCandidateMakerAlgorithm_
void run(const RoadSearchCloudCollection *input, const edm::Event &e, const edm::EventSetup &es, TrackCandidateCollection &output)
Runs the algorithm.
std::vector< TrackCandidate > TrackCandidateCollection
virtual void produce(edm::Event &e, const edm::EventSetup &c)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:85
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
tuple conf
Definition: dbtoconf.py:185
T const * product() const
Definition: Handle.h:74
std::vector< RoadSearchCloud > RoadSearchCloudCollection