CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

reco::modules::CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup, Init > Class Template Reference

#include <CandCombiner.h>

Inheritance diagram for reco::modules::CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup, Init >:
reco::modules::CandCombinerBase edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

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_

Detailed Description

template<typename Selector, typename PairSelector = AnyPairSelector, typename Cloner = ::combiner::helpers::NormalClone, typename OutputCollection = reco::CompositeCandidateCollection, typename Setup = AddFourMomenta, typename Init = typename ::reco::modules::EventSetupInit<Setup>::type>
class reco::modules::CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup, Init >

Definition at line 126 of file CandCombiner.h.


Constructor & Destructor Documentation

template<typename Selector , typename PairSelector = AnyPairSelector, typename Cloner = ::combiner::helpers::NormalClone, typename OutputCollection = reco::CompositeCandidateCollection, typename Setup = AddFourMomenta, typename Init = typename ::reco::modules::EventSetupInit<Setup>::type>
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>();
      }
template<typename Selector , typename PairSelector = AnyPairSelector, typename Cloner = ::combiner::helpers::NormalClone, typename OutputCollection = reco::CompositeCandidateCollection, typename Setup = AddFourMomenta, typename Init = typename ::reco::modules::EventSetupInit<Setup>::type>
virtual reco::modules::CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup, Init >::~CandCombiner ( ) [inline, virtual]

destructor

Definition at line 141 of file CandCombiner.h.

{ }

Member Function Documentation

template<typename Selector , typename PairSelector = AnyPairSelector, typename Cloner = ::combiner::helpers::NormalClone, typename OutputCollection = reco::CompositeCandidateCollection, typename Setup = AddFourMomenta, typename Init = typename ::reco::modules::EventSetupInit<Setup>::type>
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 edm::Event::getByLabel(), i, init, reco::modules::CandCombinerBase::labels_, n, dbtoconf::out, reco::modules::CandCombinerBase::pdgId_, edm::Event::put(), dt_dqm_sourceclient_common_cff::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);
      }

Member Data Documentation

template<typename Selector , typename PairSelector = AnyPairSelector, typename Cloner = ::combiner::helpers::NormalClone, typename OutputCollection = reco::CompositeCandidateCollection, typename Setup = AddFourMomenta, typename Init = typename ::reco::modules::EventSetupInit<Setup>::type>
::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.

template<typename Selector , typename PairSelector = AnyPairSelector, typename Cloner = ::combiner::helpers::NormalClone, typename OutputCollection = reco::CompositeCandidateCollection, typename Setup = AddFourMomenta, typename Init = typename ::reco::modules::EventSetupInit<Setup>::type>
RoleNames reco::modules::CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup, Init >::names_ [private]

Definition at line 169 of file CandCombiner.h.