CMS 3D CMS Logo

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 = nullptr;
23 }
24 
26 {
28  std::unique_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(std::move(cand_product),"CSC");
35 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:137
edm::EDGetTokenT< L1CSCTrackCollection > input_module
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:579
CSCTFCandidateProducer(const edm::ParameterSet &)
CSCTFCandidateBuilder * my_builder
void produce(edm::Event &e, const edm::EventSetup &c) override
void buildCandidates(const L1CSCTrackCollection *, std::vector< L1MuRegionalCand > *) const
T const * product() const
Definition: Handle.h:81
def move(src, dest)
Definition: eostools.py:510