test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
reco::PFCandidateWithSrcPtrFactory Class Reference

Creates a PFCandidate from an input FwdPtr, and sets the "source" Ptr to the FwdPtr.backPtr. More...

#include "CommonTools/ParticleFlow/interface/PFCandidateWithSrcPtrFactory.h"

Inheritance diagram for reco::PFCandidateWithSrcPtrFactory:

Public Member Functions

reco::PFCandidate operator() (edm::FwdPtr< reco::PFCandidate > const &input) const
 

Detailed Description

Creates a PFCandidate from an input FwdPtr, and sets the "source" Ptr to the FwdPtr.backPtr.

Author
Salvatore Rappoccio

Definition at line 16 of file PFCandidateWithSrcPtrFactory.h.

Member Function Documentation

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().

18  {
19  reco::PFCandidate output( *input );
20  /* really, what's the point in this ? The one below should be enough
21  //and the one loop here is a torture of converting Ptr<PFCandidate> to Ptr<Candidate> and back
22  for ( unsigned int isource = 0; isource < input->numberOfSourceCandidatePtrs(); ++isource ) {
23  edm::Ptr<reco::PFCandidate> ptr (input->sourceCandidatePtr(isource) );
24  output.setSourceCandidatePtr( ptr );
25  }
26  */
27  output.setSourceCandidatePtr( input.backPtr() );
28  return output;
29  }
Ptr< value_type > const & backPtr() const
Definition: FwdPtr.h:121
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:38