CMS 3D CMS Logo

CandReducer.cc
Go to the documentation of this file.
1 
22 
24 public:
26  explicit CandReducer(const edm::ParameterSet&);
28  ~CandReducer() override = default;
29 
30 private:
32  void produce(edm::StreamID, edm::Event& e, edm::EventSetup const& c) const override;
35 };
36 
41 
42 using namespace reco;
43 using namespace edm;
44 
46  : srcToken_(consumes<reco::CandidateView>(cfg.getParameter<edm::InputTag>("src"))) {
47  produces<CandidateCollection>();
48 }
49 
52  std::unique_ptr<CandidateCollection> comp(new CandidateCollection);
53  for (reco::CandidateView::const_iterator c = cands->begin(); c != cands->end(); ++c) {
54  std::unique_ptr<Candidate> cand(new LeafCandidate(*c));
55  comp->push_back(cand.release());
56  }
57  evt.put(std::move(comp));
58 }
59 
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
const edm::EDGetTokenT< reco::CandidateView > srcToken_
label of source candidate collection
Definition: CandReducer.cc:34
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
void produce(edm::StreamID, edm::Event &e, edm::EventSetup const &c) const override
process one evevnt
Definition: CandReducer.cc:50
~CandReducer() override=default
destructor
CandReducer(const edm::ParameterSet &)
constructor from parameter set
Definition: CandReducer.cc:45
fixed size matrix
Handle< PROD > getHandle(EDGetTokenT< PROD > token) const
Definition: Event.h:560
HLT enums.
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
def move(src, dest)
Definition: eostools.py:511