ATLAS Offline Software
Loading...
Searching...
No Matches
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
11
12namespace xAOD{
13
14static 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}
stored_index_type persIndex() const
Return the index of the link.
sgkey_t persKey() const
Return the SG key that we reference, as a hash.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
JetConstituentVector::iterator iterator
static void convertLinks(std::vector< ElementLink< PFOContainer > > &pfoContainer, std::vector< ElementLink< IParticleContainer > > &particleContainer)
Definition PFOHelper.h:14