Public Member Functions | |
CandViewRefMerger (const edm::ParameterSet &cfg) | |
Private Member Functions | |
void | produce (edm::Event &evt, const edm::EventSetup &) |
Private Attributes | |
std::vector< edm::InputTag > | src_ |
Definition at line 16 of file CandViewRefMerger.cc.
CandViewRefMerger::CandViewRefMerger | ( | const edm::ParameterSet & | cfg | ) | [inline, explicit] |
Definition at line 18 of file CandViewRefMerger.cc.
: src_(cfg.getParameter<std::vector<edm::InputTag> >("src")) { produces<std::vector<reco::CandidateBaseRef> >(); }
void CandViewRefMerger::produce | ( | edm::Event & | evt, |
const edm::EventSetup & | |||
) | [inline, private, virtual] |
Implements edm::EDProducer.
Definition at line 23 of file CandViewRefMerger.cc.
References edm::RefToBaseVector< T >::begin(), edm::RefToBaseVector< T >::end(), edm::Event::getByLabel(), i, j, dbtoconf::out, edm::Event::put(), align_tpl::src, and src_.
{ std::auto_ptr<std::vector<reco::CandidateBaseRef> > out(new std::vector<reco::CandidateBaseRef>); for(std::vector<edm::InputTag>::const_iterator i = src_.begin(); i != src_.end(); ++i) { edm::Handle<reco::CandidateView> src; evt.getByLabel(*i, src); reco::CandidateBaseRefVector refs = src->refVector(); for(reco::CandidateBaseRefVector::const_iterator j = refs.begin(); j != refs.end(); ++j) out->push_back(*j); } evt.put(out); }
std::vector<edm::InputTag> CandViewRefMerger::src_ [private] |
Definition at line 34 of file CandViewRefMerger.cc.
Referenced by produce().