CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

PFTauViewRefMerger Class Reference

Inheritance diagram for PFTauViewRefMerger:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

Public Member Functions

 PFTauViewRefMerger (const edm::ParameterSet &cfg)

Private Member Functions

void produce (edm::Event &evt, const edm::EventSetup &)

Private Attributes

std::vector< edm::InputTagsrc_

Detailed Description

Definition at line 22 of file PFTauViewRefMerger.cc.


Constructor & Destructor Documentation

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>();
        }

Member Function Documentation

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(), align_tpl::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);
    }

Member Data Documentation

std::vector<edm::InputTag> PFTauViewRefMerger::src_ [private]

Definition at line 43 of file PFTauViewRefMerger.cc.

Referenced by produce().