diff --git a/Event/xAOD/xAODPFlow/Root/PFO_v1.cxx b/Event/xAOD/xAODPFlow/Root/PFO_v1.cxx index 1fba9bdac128ebcfce64cda28a23122e7455b0da..4fcff8b6cd8fbba1fb55b411fd3b08aa14de50c1 100644 --- a/Event/xAOD/xAODPFlow/Root/PFO_v1.cxx +++ b/Event/xAOD/xAODPFlow/Root/PFO_v1.cxx @@ -563,7 +563,7 @@ namespace xAOD { } bool PFO_v1::addAssociatedParticleLink(PFODetails::PFOParticleType ParticleType, const ElementLink<IParticleContainer>& theParticle) { - const static Accessor<std::vector<ElementLink<IParticleContainer > > >* p_acc = PFOParticleTypeMapper_temp::getAccessor(ParticleType); + const Accessor<std::vector<ElementLink<IParticleContainer > > >* p_acc = PFOParticleTypeMapper_temp::getAccessor(ParticleType); if (!p_acc) return false; else{ if (!p_acc->isAvailable(*this)) return false; @@ -593,7 +593,7 @@ namespace xAOD { bool PFO_v1::setAssociatedParticleLinks(PFODetails::PFOParticleType ParticleType, const std::vector<ElementLink<IParticleContainer> >& theParticles) { - const static Accessor<std::vector<ElementLink<IParticleContainer > > >* p_acc = PFOParticleTypeMapper_temp::getAccessor(ParticleType); + const Accessor<std::vector<ElementLink<IParticleContainer > > >* p_acc = PFOParticleTypeMapper_temp::getAccessor(ParticleType); if (!p_acc) return false; else{ (*p_acc)(*this) = theParticles; @@ -603,7 +603,7 @@ namespace xAOD { bool PFO_v1::associatedParticles(PFODetails::PFOParticleType ParticleType, std::vector<const IParticle*>& theParticles ) const{ - const static ConstAccessor<std::vector<ElementLink<IParticleContainer > > >* p_acc = PFOParticleTypeMapper_temp::getAccessor(ParticleType); + const ConstAccessor<std::vector<ElementLink<IParticleContainer > > >* p_acc = PFOParticleTypeMapper_temp::getAccessor(ParticleType); if (!p_acc) return false; else{ if (!p_acc->isAvailable(*this)) return false; @@ -652,7 +652,7 @@ namespace xAOD { const CaloCluster* PFO_v1::cluster(unsigned int index) const { - const static ConstAccessor<std::vector<ElementLink<IParticleContainer > > >* p_acc = PFOParticleTypeMapper_temp::getAccessor(PFODetails::CaloCluster); + const ConstAccessor<std::vector<ElementLink<IParticleContainer > > >* p_acc = PFOParticleTypeMapper_temp::getAccessor(PFODetails::CaloCluster); if (!p_acc) return nullptr; else if (!p_acc->isAvailable(*this)) {return nullptr;} else { @@ -674,7 +674,7 @@ namespace xAOD { const TrackParticle* PFO_v1::track(unsigned int index) const { - const static ConstAccessor<std::vector<ElementLink<IParticleContainer > > >* p_acc = PFOParticleTypeMapper_temp::getAccessor(PFODetails::Track); + const ConstAccessor<std::vector<ElementLink<IParticleContainer > > >* p_acc = PFOParticleTypeMapper_temp::getAccessor(PFODetails::Track); if (!p_acc) return nullptr; else if (!p_acc->isAvailable(*this)) {return nullptr;} else { @@ -761,7 +761,7 @@ namespace xAOD { //if you added your own consituents the links will not be correctly persistified //clusters - const static Accessor<std::vector<ElementLink<IParticleContainer > > >* p_accClusters = PFOParticleTypeMapper_temp::getAccessor(PFODetails::CaloCluster); + const Accessor<std::vector<ElementLink<IParticleContainer > > >* p_accClusters = PFOParticleTypeMapper_temp::getAccessor(PFODetails::CaloCluster); if (p_accClusters){ const static Accessor<std::vector<ElementLink<IParticleContainer > > >& accClusters = *p_accClusters; if ( accClusters.isAvailableWritable(*this) ){ @@ -773,7 +773,7 @@ namespace xAOD { } //tracks - const static Accessor<std::vector<ElementLink<IParticleContainer > > >* p_accTracks = PFOParticleTypeMapper_temp::getAccessor(PFODetails::Track); + const Accessor<std::vector<ElementLink<IParticleContainer > > >* p_accTracks = PFOParticleTypeMapper_temp::getAccessor(PFODetails::Track); if (p_accTracks){ const static Accessor<std::vector<ElementLink<IParticleContainer > > >& accTracks = *p_accTracks; if ( accTracks.isAvailableWritable(*this) ){ @@ -786,7 +786,7 @@ namespace xAOD { } //shots - const static Accessor<std::vector<ElementLink<IParticleContainer > > >* p_accShots = PFOParticleTypeMapper_temp::getAccessor(PFODetails::TauShot); + const Accessor<std::vector<ElementLink<IParticleContainer > > >* p_accShots = PFOParticleTypeMapper_temp::getAccessor(PFODetails::TauShot); if (p_accShots){ const static Accessor<std::vector<ElementLink<IParticleContainer > > >& accShots = *p_accShots; if ( accShots.isAvailableWritable(*this) ){ diff --git a/Event/xAOD/xAODPFlow/xAODPFlow/versions/PFO_v1.icc b/Event/xAOD/xAODPFlow/xAODPFlow/versions/PFO_v1.icc index 35221aeef04dd6e8699ef73726f0c8028c164b11..8fbe601a2f2dfc0a24e214302a3523434bf0b2e8 100644 --- a/Event/xAOD/xAODPFlow/xAODPFlow/versions/PFO_v1.icc +++ b/Event/xAOD/xAODPFlow/xAODPFlow/versions/PFO_v1.icc @@ -15,7 +15,7 @@ namespace xAOD{ template<class T> bool PFO_v1::attribute(PFODetails::PFOAttributes AttributeType, T& anAttribute) const { - const static ConstAccessor<T>* acc = PFOAttributesAccessor_v1<T>::accessor(AttributeType); + const ConstAccessor<T>* acc = PFOAttributesAccessor_v1<T>::accessor(AttributeType); //check if accessor pointer is NULL if( ! acc ) { return false ;} //check if variable is avaialable