#include <RecoTracker/TkSeedGenerator/plugins/SeedGeneratorFromProtoTracksEDProducer.h>
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 |
Definition at line 11 of file SeedGeneratorFromProtoTracksEDProducer.h.
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] |
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 }
Definition at line 17 of file SeedGeneratorFromProtoTracksEDProducer.h.