CommonTools
ParticleFlow
interface
PFCandidateWithSrcPtrFactory.h
Go to the documentation of this file.
1
#ifndef CommonTools_ParticleFlow_PFCandidateWithSrcPtrFactor_h
2
#define CommonTools_ParticleFlow_PFCandidateWithSrcPtrFactor_h
3
12
#include "
DataFormats/ParticleFlowCandidate/interface/PFCandidate.h
"
13
#include "
DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h
"
14
15
namespace
reco
{
16
class
PFCandidateWithSrcPtrFactory
{
17
public
:
18
reco::PFCandidate
operator()
(
edm::FwdPtr<reco::PFCandidate>
const
&
input
)
const
{
19
reco::PFCandidate
output
(*
input
);
20
21
if
(
input
.backPtr().isAvailable())
22
output
.setSourceCandidatePtr(
input
.backPtr());
23
else
//we are in a job where the original collection is gone
24
output
.setSourceCandidatePtr(
input
.ptr());
25
return
output
;
26
}
27
};
28
}
// namespace reco
29
30
#endif
input
static const std::string input
Definition:
EdmProvDump.cc:48
reco::PFCandidateWithSrcPtrFactory::operator()
reco::PFCandidate operator()(edm::FwdPtr< reco::PFCandidate > const &input) const
Definition:
PFCandidateWithSrcPtrFactory.h:18
PFCandidate.h
convertSQLitetoXML_cfg.output
output
Definition:
convertSQLitetoXML_cfg.py:72
reco
fixed size matrix
Definition:
AlignmentAlgorithmBase.h:45
edm::FwdPtr
Definition:
FwdPtr.h:40
reco::PFCandidateWithSrcPtrFactory
Creates a PFCandidate from an input FwdPtr, and sets the "source" Ptr to the FwdPtr....
Definition:
PFCandidateWithSrcPtrFactory.h:16
reco::PFCandidate
Particle reconstructed by the particle flow algorithm.
Definition:
PFCandidate.h:41
PFCandidateFwd.h
Generated for CMSSW Reference Manual by
1.8.16