CMS 3D CMS Logo

SeedGeneratorFromProtoTracksEDProducer Class Reference

#include <RecoTracker/TkSeedGenerator/plugins/SeedGeneratorFromProtoTracksEDProducer.h>

Inheritance diagram for SeedGeneratorFromProtoTracksEDProducer:

edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

Public Member Functions

virtual void produce (edm::Event &ev, const edm::EventSetup &es)
 SeedGeneratorFromProtoTracksEDProducer (const edm::ParameterSet &cfg)
virtual ~SeedGeneratorFromProtoTracksEDProducer ()

Private Attributes

edm::ParameterSet theConfig
edm::InputTag theInputCollectionTag


Detailed Description

Definition at line 11 of file SeedGeneratorFromProtoTracksEDProducer.h.


Constructor & Destructor Documentation

SeedGeneratorFromProtoTracksEDProducer::SeedGeneratorFromProtoTracksEDProducer ( const edm::ParameterSet cfg  ) 

Definition at line 19 of file SeedGeneratorFromProtoTracksEDProducer.cc.

00020   : theConfig(cfg), theInputCollectionTag(cfg.getParameter<InputTag>("InputCollection"))
00021 {
00022   produces<TrajectorySeedCollection>();
00023 }

virtual SeedGeneratorFromProtoTracksEDProducer::~SeedGeneratorFromProtoTracksEDProducer (  )  [inline, virtual]

Definition at line 14 of file SeedGeneratorFromProtoTracksEDProducer.h.

00014 {}


Member Function Documentation

void SeedGeneratorFromProtoTracksEDProducer::produce ( edm::Event ev,
const edm::EventSetup es 
) [virtual]

Implements edm::EDProducer.

Definition at line 25 of file SeedGeneratorFromProtoTracksEDProducer.cc.

References edm::Event::getByLabel(), SeedFromProtoTrack::isValid(), it, edm::Handle< T >::product(), proto, edm::Event::put(), HLT_VtxMuL3::result, theInputCollectionTag, HLT_VtxMuL3::TrackCollection, and SeedFromProtoTrack::trajectorySeed().

00026 {
00027   std::auto_ptr<TrajectorySeedCollection> result(new TrajectorySeedCollection());
00028   Handle<reco::TrackCollection> trks;
00029   ev.getByLabel(theInputCollectionTag, trks);
00030 
00031   const TrackCollection &protos = *(trks.product());
00032   
00033   for (TrackCollection::const_iterator it=protos.begin(); it!= protos.end(); ++it) {
00034     const Track & proto = (*it);
00035 
00036     SeedFromProtoTrack seedFromProtoTrack( proto, es);
00037     if (seedFromProtoTrack.isValid()) (*result).push_back( seedFromProtoTrack.trajectorySeed() );
00038   }
00039   ev.put(result);
00040 }


Member Data Documentation

edm::ParameterSet SeedGeneratorFromProtoTracksEDProducer::theConfig [private]

Definition at line 17 of file SeedGeneratorFromProtoTracksEDProducer.h.

edm::InputTag SeedGeneratorFromProtoTracksEDProducer::theInputCollectionTag [private]

Definition at line 18 of file SeedGeneratorFromProtoTracksEDProducer.h.

Referenced by produce().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:31:16 2009 for CMSSW by  doxygen 1.5.4