![]() |
![]() |
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 | |
std::string | src_ |
label of source candidate collection |
Definition at line 21 of file CandReducer.cc.
CandReducer::CandReducer | ( | const edm::ParameterSet & | cfg | ) | [explicit] |
constructor from parameter set
Definition at line 42 of file CandReducer.cc.
00042 : 00043 src_( cfg.getParameter<std::string>("src") ) { 00044 produces<CandidateCollection>(); 00045 }
CandReducer::~CandReducer | ( | ) |
void CandReducer::produce | ( | edm::Event & | evt, | |
const edm::EventSetup & | ||||
) | [private, virtual] |
process one evevnt
Implements edm::EDProducer.
Definition at line 50 of file CandReducer.cc.
References c, edm::Event::getByLabel(), edm::Event::put(), and src_.
00050 { 00051 Handle<CandidateCollection> cands; 00052 evt.getByLabel( src_, cands ); 00053 std::auto_ptr<CandidateCollection> comp( new CandidateCollection ); 00054 for( CandidateCollection::const_iterator c = cands->begin(); c != cands->end(); ++c ) { 00055 std::auto_ptr<Candidate> cand( new LeafCandidate( * c ) ); 00056 comp->push_back( cand.release() ); 00057 } 00058 evt.put( comp ); 00059 }
std::string CandReducer::src_ [private] |
label of source candidate collection
Definition at line 31 of file CandReducer.cc.
Referenced by produce().