Public Member Functions | |
PFTauViewRefMerger (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 22 of file PFTauViewRefMerger.cc.
PFTauViewRefMerger::PFTauViewRefMerger | ( | const edm::ParameterSet & | cfg | ) | [inline, explicit] |
Definition at line 24 of file PFTauViewRefMerger.cc.
: src_(cfg.getParameter<std::vector<edm::InputTag> >("src")) { produces<reco::PFTauRefVector>(); }
void PFTauViewRefMerger::produce | ( | edm::Event & | evt, |
const edm::EventSetup & | |||
) | [inline, private, virtual] |
Implements edm::EDProducer.
Definition at line 29 of file PFTauViewRefMerger.cc.
References edm::Event::getByLabel(), dbtoconf::out, edm::RefVector< C, T, F >::push_back(), edm::Event::put(), alcazmumu_cfi::src, src_, and metsig::tau.
{ std::auto_ptr<reco::PFTauRefVector> out(new reco::PFTauRefVector()); BOOST_FOREACH(const edm::InputTag& inputSrc, src_) { edm::Handle<reco::CandidateView> src; evt.getByLabel(inputSrc, src); reco::PFTauRefVector inputRefs = reco::tau::castView<reco::PFTauRefVector>(src); // Merge all the collections BOOST_FOREACH(const reco::PFTauRef tau, inputRefs) { out->push_back(tau); } } evt.put(out); }
std::vector<edm::InputTag> PFTauViewRefMerger::src_ [private] |
Definition at line 43 of file PFTauViewRefMerger.cc.
Referenced by produce().