#include <CandCombiner.h>
Public Member Functions | |
CandCombiner (const edm::ParameterSet &cfg) | |
constructor from parameter settypedef | |
virtual | ~CandCombiner () |
destructor | |
Private Member Functions | |
void | produce (edm::Event &evt, const edm::EventSetup &es) |
process an event | |
Private Attributes | |
::CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup > | combiner_ |
combiner utility | |
RoleNames | names_ |
Definition at line 126 of file CandCombiner.h.
reco::modules::CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup, Init >::CandCombiner | ( | const edm::ParameterSet & | cfg | ) | [inline, explicit] |
constructor from parameter settypedef
Definition at line 129 of file CandCombiner.h.
: CandCombinerBase(cfg), combiner_(reco::modules::make<Selector>(cfg), reco::modules::make<PairSelector>(cfg), Setup(cfg), cfg.existsAs<bool>("checkCharge") ? cfg.getParameter<bool>("checkCharge") : true, cfg.existsAs<bool>("checkOverlap") ? cfg.getParameter<bool>("checkOverlap") : true, dauCharge_), names_(cfg) { produces<OutputCollection>(); }
virtual reco::modules::CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup, Init >::~CandCombiner | ( | ) | [inline, virtual] |
void reco::modules::CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup, Init >::produce | ( | edm::Event & | evt, |
const edm::EventSetup & | es | ||
) | [inline, private, virtual] |
process an event
Implements edm::EDProducer.
Definition at line 145 of file CandCombiner.h.
References alignCSCRings::e, edm::Event::getByLabel(), i, init, reco::modules::CandCombinerBase::labels_, n, dbtoconf::out, reco::modules::CandCombinerBase::pdgId_, edm::Event::put(), L1Trigger_dataformats::reco, reco::modules::CandCombinerBase::setLongLived_, reco::modules::CandCombinerBase::setMassConstraint_, and reco::modules::CandCombinerBase::setPdgId_.
{ using namespace std; using namespace reco; Init::init(combiner_.setup(), evt, es); int n = labels_.size(); vector<edm::Handle<CandidateView> > colls(n); for(int i = 0; i < n; ++i) evt.getByLabel(labels_[i].tag_, colls[i]); auto_ptr<OutputCollection> out = combiner_.combine(colls, names_.roles()); if(setLongLived_ || setMassConstraint_ || setPdgId_) { typename OutputCollection::iterator i = out->begin(), e = out->end(); for(; i != e; ++i) { names_.set(*i); if(setLongLived_) i->setLongLived(); if(setMassConstraint_) i->setMassConstraint(); if(setPdgId_) i->setPdgId(pdgId_); } } evt.put(out); }
::CandCombiner<Selector, PairSelector, Cloner, OutputCollection, Setup> reco::modules::CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup, Init >::combiner_ [private] |
combiner utility
Definition at line 167 of file CandCombiner.h.
RoleNames reco::modules::CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup, Init >::names_ [private] |
Definition at line 169 of file CandCombiner.h.