Skip to content

Commit f8fd039

Browse files
committed
use variable
1 parent 75569c8 commit f8fd039

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

PhysicsTools/PatAlgos/plugins/PATJetCandidatesRekeyer.cc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,15 @@ void PATJetCandidatesRekeyer::produce(edm::Event &iEvent, edm::EventSetup const
8585
}
8686

8787
// Copy the tag infos
88-
for (const auto &info : outPtrP->back().tagInfosFwdPtr()) {
88+
for (TagInfoFwdPtrCollection::const_iterator iinfoBegin = outPtrP->back().tagInfosFwdPtr().begin(),
89+
iinfoEnd = outPtrP->back().tagInfosFwdPtr().end(),
90+
iinfo = iinfoBegin;
91+
iinfo != iinfoEnd;
92+
++iinfo) {
8993
// Update the "forward" bit of the FwdPtr to point at the new collection.
9094
// ptr to "this" info in the global list
9195
edm::Ptr<reco::BaseTagInfo> outPtr(oh_tagInfosOut, tagInfoIndex);
92-
outPtrP->back().updateFwdTagInfoFwdPtr(tagInfoIndex, outPtr);
96+
outPtrP->back().updateFwdTagInfoFwdPtr(iinfo - iinfoBegin, outPtr);
9397
++tagInfoIndex;
9498
}
9599
}

0 commit comments

Comments
 (0)