ATLAS Offline Software
PFOHelper.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include <vector>
6 #include "AthLinks/ElementLink.h"
7 
9 
10 #include "xAODPFlow/PFOContainer.h"
11 
12 namespace xAOD{
13 
14 static void convertLinks(std::vector<ElementLink<PFOContainer> >& pfoContainer, std::vector<ElementLink<IParticleContainer> >& particleContainer){
15 
16  std::vector<ElementLink<PFOContainer>>::iterator firstPFO = pfoContainer.begin();
17  std::vector<ElementLink<PFOContainer>>::iterator lastPFO = pfoContainer.end();
18 
19  for (; firstPFO != lastPFO; ++firstPFO){
20  ElementLink<PFOContainer> thePFOLink = *firstPFO;
21  thePFOLink.toPersistent();
23  myLink.resetWithKeyAndIndex( thePFOLink.persKey(), thePFOLink.persIndex() );
24  particleContainer.push_back(myLink);
25  }
26 
27 }
28 
29 }
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
PFOContainer.h
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
IParticleContainer.h