Public Member Functions | |
CandViewRefTriggerBiasRemover (const edm::ParameterSet &pset) | |
void | produce (edm::Event &, const edm::EventSetup &) |
Private Attributes | |
edm::InputTag | src_ |
Definition at line 26 of file CandViewRefTriggerBiasRemover.cc.
CandViewRefTriggerBiasRemover::CandViewRefTriggerBiasRemover | ( | const edm::ParameterSet & | pset | ) |
Definition at line 34 of file CandViewRefTriggerBiasRemover.cc.
References edm::ParameterSet::getParameter(), and src_.
{ src_ = pset.getParameter<edm::InputTag>("triggered"); produces<reco::CandidateBaseRefVector>(); }
void CandViewRefTriggerBiasRemover::produce | ( | edm::Event & | evt, |
const edm::EventSetup & | es | ||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 40 of file CandViewRefTriggerBiasRemover.cc.
References edm::Event::getByLabel(), convertSQLitetoXML_cfg::output, edm::Event::put(), and src_.
{ edm::Handle<edm::View<reco::Candidate> > cands; evt.getByLabel(src_, cands); std::auto_ptr<reco::CandidateBaseRefVector> output( new reco::CandidateBaseRefVector(cands)); // Only copy the output if there is more than one item in the input size_t nCands = cands->size(); if (nCands > 1) { //output->reserve(nCands); for (size_t iCand = 0; iCand < nCands; ++iCand) { output->push_back(cands->refVector().at(iCand)); } } evt.put(output); }
Definition at line 31 of file CandViewRefTriggerBiasRemover.cc.
Referenced by CandViewRefTriggerBiasRemover(), and produce().