Creates a PFCandidate from an input FwdPtr, and sets the "source" Ptr to the FwdPtr.backPtr. More...
#include <CommonTools/ParticleFlow/interface/PFCandidateWithSrcPtrFactory.h>
Public Member Functions | |
reco::PFCandidate | operator() (edm::FwdPtr< reco::PFCandidate > const &input) const |
Creates a PFCandidate from an input FwdPtr, and sets the "source" Ptr to the FwdPtr.backPtr.
Definition at line 16 of file PFCandidateWithSrcPtrFactory.h.
reco::PFCandidate reco::PFCandidateWithSrcPtrFactory::operator() | ( | edm::FwdPtr< reco::PFCandidate > const & | input | ) | const [inline] |
Definition at line 18 of file PFCandidateWithSrcPtrFactory.h.
References edm::FwdPtr< T >::backPtr(), convertSQLitetoXML_cfg::output, and reco::PFCandidate::setSourceCandidatePtr().
{ reco::PFCandidate output( *input ); /* really, what's the point in this ? The one below should be enough //and the one loop here is a torture of converting Ptr<PFCandidate> to Ptr<Candidate> and back for ( unsigned int isource = 0; isource < input->numberOfSourceCandidatePtrs(); ++isource ) { edm::Ptr<reco::PFCandidate> ptr (input->sourceCandidatePtr(isource) ); output.setSourceCandidatePtr( ptr ); } */ output.setSourceCandidatePtr( input.backPtr() ); return output; }