CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CSCTFCandidateProducer.cc
Go to the documentation of this file.
3 
4 #include <vector>
7 
10 
12 {
13  edm::ParameterSet mu_sorter_pset = pset.getParameter<edm::ParameterSet>("MuonSorter");
14  my_builder = new CSCTFCandidateBuilder(mu_sorter_pset);
15  input_module = consumes<L1CSCTrackCollection>(pset.getUntrackedParameter<edm::InputTag>("CSCTrackProducer"));
16  produces<std::vector<L1MuRegionalCand> >("CSC");
17 }
18 
20 {
21  delete my_builder;
22  my_builder = NULL;
23 }
24 
26 {
28  std::auto_ptr<std::vector<L1MuRegionalCand> > cand_product(new std::vector<L1MuRegionalCand>);
29 
30  e.getByToken(input_module, tracks);
31 
32  my_builder->buildCandidates(tracks.product(), cand_product.get());
33 
34  e.put(cand_product,"CSC");
35 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< L1CSCTrackCollection > input_module
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
#define NULL
Definition: scimark2.h:8
CSCTFCandidateProducer(const edm::ParameterSet &)
CSCTFCandidateBuilder * my_builder
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:121
void buildCandidates(const L1CSCTrackCollection *, std::vector< L1MuRegionalCand > *) const
T const * product() const
Definition: Handle.h:81
tuple tracks
Definition: testEve_cfg.py:39
void produce(edm::Event &e, const edm::EventSetup &c)