#include <PFCand_NoPU_WithAM.h>
Public Member Functions | |
PFCand_NoPU_WithAM (const edm::ParameterSet &) | |
~PFCand_NoPU_WithAM () | |
Static Public Member Functions | |
static void | fillDescriptions (edm::ConfigurationDescriptions &descriptions) |
Private Member Functions | |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
Private Attributes | |
edm::InputTag | input_VertexPFCandAssociationMap_ |
Definition at line 38 of file PFCand_NoPU_WithAM.h.
PFCand_NoPU_WithAM::PFCand_NoPU_WithAM | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 72 of file PFCand_NoPU_WithAM.cc.
References edm::ParameterSet::getParameter().
{ //register your products produces<PFCandidateCollection>(); //now do what ever other initialization is needed input_VertexPFCandAssociationMap_ = iConfig.getParameter<InputTag>("VertexPFCandAssociationMap"); }
PFCand_NoPU_WithAM::~PFCand_NoPU_WithAM | ( | ) |
Definition at line 85 of file PFCand_NoPU_WithAM.cc.
{ // do anything here that needs to be done at desctruction time // (e.g. close files, deallocate resources etc.) }
void PFCand_NoPU_WithAM::fillDescriptions | ( | edm::ConfigurationDescriptions & | descriptions | ) | [static] |
Reimplemented from edm::EDProducer.
Definition at line 127 of file PFCand_NoPU_WithAM.cc.
References edm::ConfigurationDescriptions::addDefault(), and edm::ParameterSetDescription::setUnknown().
{ //The following says we do not know what parameters are allowed so do no validation // Please change this to state exactly what you do use, even if it is no parameters edm::ParameterSetDescription desc; desc.setUnknown(); descriptions.addDefault(desc); }
void PFCand_NoPU_WithAM::produce | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |
Implements edm::EDProducer.
Definition at line 100 of file PFCand_NoPU_WithAM.cc.
References edm::Event::getByLabel(), and edm::Event::put().
{ auto_ptr<PFCandidateCollection> firstvertexCandidates(new PFCandidateCollection() ); //get the input vertex<->pfcandidate association map Handle<PFCandVertexAssMap> PFCandAmH; iEvent.getByLabel(input_VertexPFCandAssociationMap_,PFCandAmH); PFCandQualityPairVector pfcColl; if(PFCandAmH->size()!=0){ pfcColl = PFCandAmH->begin()->val; } for(unsigned pfc_ite=0; pfc_ite<pfcColl.size(); pfc_ite++){ PFCandidateRef candref = pfcColl[pfc_ite].first; firstvertexCandidates->push_back(*candref); } iEvent.put( firstvertexCandidates ); }
Definition at line 50 of file PFCand_NoPU_WithAM.h.