Public Member Functions | |
CandReducer (const edm::ParameterSet &) | |
constructor from parameter set | |
~CandReducer () | |
destructor | |
Private Member Functions | |
void | produce (edm::Event &evt, const edm::EventSetup &) |
process one evevnt | |
Private Attributes | |
edm::InputTag | src_ |
label of source candidate collection |
Definition at line 22 of file CandReducer.cc.
CandReducer::CandReducer | ( | const edm::ParameterSet & | cfg | ) | [explicit] |
constructor from parameter set
Definition at line 44 of file CandReducer.cc.
: src_( cfg.getParameter<edm::InputTag>("src") ) { produces<CandidateCollection>(); }
CandReducer::~CandReducer | ( | ) |
void CandReducer::produce | ( | edm::Event & | evt, |
const edm::EventSetup & | |||
) | [private, virtual] |
process one evevnt
Implements edm::EDProducer.
Definition at line 52 of file CandReducer.cc.
References trackerHits::c, edm::Event::getByLabel(), edm::Event::put(), and src_.
{ Handle<reco::CandidateView> cands; evt.getByLabel( src_, cands ); std::auto_ptr<CandidateCollection> comp( new CandidateCollection ); for( reco::CandidateView::const_iterator c = cands->begin(); c != cands->end(); ++c ) { std::auto_ptr<Candidate> cand( new LeafCandidate( * c ) ); comp->push_back( cand.release() ); } evt.put( comp ); }
edm::InputTag CandReducer::src_ [private] |
label of source candidate collection
Definition at line 32 of file CandReducer.cc.
Referenced by produce().