CMS 3D CMS Logo

Public Member Functions | Private Attributes

CSCTFCandidateProducer Class Reference

#include <CSCTFCandidateProducer.h>

Inheritance diagram for CSCTFCandidateProducer:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

List of all members.

Public Member Functions

 CSCTFCandidateProducer (const edm::ParameterSet &)
void produce (edm::Event &e, const edm::EventSetup &c)
virtual ~CSCTFCandidateProducer ()

Private Attributes

edm::InputTag input_module
CSCTFCandidateBuildermy_builder

Detailed Description

Definition at line 12 of file CSCTFCandidateProducer.h.


Constructor & Destructor Documentation

CSCTFCandidateProducer::CSCTFCandidateProducer ( const edm::ParameterSet pset)

Definition at line 11 of file CSCTFCandidateProducer.cc.

References edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), input_module, and my_builder.

{
  edm::ParameterSet mu_sorter_pset = pset.getParameter<edm::ParameterSet>("MuonSorter");
  my_builder = new CSCTFCandidateBuilder(mu_sorter_pset);
  input_module = pset.getUntrackedParameter<edm::InputTag>("CSCTrackProducer");
  produces<std::vector<L1MuRegionalCand> >("CSC");
}
CSCTFCandidateProducer::~CSCTFCandidateProducer ( ) [virtual]

Definition at line 19 of file CSCTFCandidateProducer.cc.

References my_builder, and NULL.

{
  delete my_builder;
  my_builder = NULL;
}

Member Function Documentation

void CSCTFCandidateProducer::produce ( edm::Event e,
const edm::EventSetup c 
) [virtual]

Implements edm::EDProducer.

Definition at line 25 of file CSCTFCandidateProducer.cc.

References CSCTFCandidateBuilder::buildCandidates(), edm::Event::getByLabel(), input_module, edm::InputTag::instance(), edm::InputTag::label(), my_builder, edm::Handle< T >::product(), edm::Event::put(), and testEve_cfg::tracks.

{
  edm::Handle<L1CSCTrackCollection> tracks;
  std::auto_ptr<std::vector<L1MuRegionalCand> > cand_product(new std::vector<L1MuRegionalCand>);

  e.getByLabel(input_module.label(),input_module.instance(), tracks);

  my_builder->buildCandidates(tracks.product(), cand_product.get());

  e.put(cand_product,"CSC");
}

Member Data Documentation

Definition at line 23 of file CSCTFCandidateProducer.h.

Referenced by CSCTFCandidateProducer(), and produce().