CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
PFConcretePFCandidateProducer Class Reference
Inheritance diagram for PFConcretePFCandidateProducer:
edm::stream::EDProducer<>

Public Member Functions

 PFConcretePFCandidateProducer (const edm::ParameterSet &)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
 ~PFConcretePFCandidateProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Attributes

const edm::EDGetTokenT< reco::PFCandidateCollectioninputColl_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Detailed Description

Definition at line 11 of file PFConcretePFCandidateProducer.cc.

Constructor & Destructor Documentation

◆ PFConcretePFCandidateProducer()

PFConcretePFCandidateProducer::PFConcretePFCandidateProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 31 of file PFConcretePFCandidateProducer.cc.

32  : inputColl_(consumes<reco::PFCandidateCollection>(iConfig.getParameter<edm::InputTag>("src"))) {
33  // register products
34  produces<reco::PFCandidateCollection>();
35 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
const edm::EDGetTokenT< reco::PFCandidateCollection > inputColl_

◆ ~PFConcretePFCandidateProducer()

PFConcretePFCandidateProducer::~PFConcretePFCandidateProducer ( )
override

Definition at line 37 of file PFConcretePFCandidateProducer.cc.

37 {}

Member Function Documentation

◆ fillDescriptions()

void PFConcretePFCandidateProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

◆ produce()

void PFConcretePFCandidateProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Definition at line 39 of file PFConcretePFCandidateProducer.cc.

References iEvent, HLT_2024v13_cff::inputColl, inputColl_, eostools::move(), hiSpikeCleaner_cfi::outputColl, and packedPFCandidateRefMixer_cfi::pf.

39  {
40  const auto& inputColl = iEvent.getHandle(inputColl_);
41 
42  if (!inputColl.isValid()) {
43  // nothing ... I guess we prefer to send an exception in the next lines
44  }
45 
46  auto outputColl = std::make_unique<reco::PFCandidateCollection>();
47  outputColl->resize(inputColl->size());
48 
49  for (unsigned int iCopy = 0; iCopy != inputColl->size(); ++iCopy) {
50  const reco::PFCandidate& pf = (*inputColl)[iCopy];
51  (*outputColl)[iCopy] = pf;
52  //dereferenced internally the ref and hardcopy the value
53  (*outputColl)[iCopy].setVertex(pf.vertex());
54  //math::XYZPoint(pf.vx(),pf.vy(),pf.vz()));
55  }
56 
58 }
int iEvent
Definition: GenABIO.cc:224
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:41
const edm::EDGetTokenT< reco::PFCandidateCollection > inputColl_
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

◆ inputColl_

const edm::EDGetTokenT<reco::PFCandidateCollection> PFConcretePFCandidateProducer::inputColl_
private

Definition at line 20 of file PFConcretePFCandidateProducer.cc.

Referenced by produce().