Skip to content
Snippets Groups Projects
Commit b10d338b authored by Susumu Oda's avatar Susumu Oda Committed by Edward Moyse
Browse files

Revert "Reserve vector (ATLASRECTS-3828)"

This reverts commit 2ae7a960ff7533b220f4092d8628d470e109f8fa.
parent e09edfcd
No related branches found
No related tags found
No related merge requests found
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
*/
///////////////////////////////////////////////////////////////////
......@@ -17,6 +17,9 @@
#include "TrkDetDescrUtils/BinnedArray1D1D.h"
#include "TrkDetDescrUtils/Intersection.h"
// STL include
#include <atomic>
#ifndef INDETTRACKINGGEOMETRY_DISCDETADDNEXTPHIETA
#define INDETTRACKINGGEOMETRY_DISCDETADDNEXTPHIETA
#define addSurfaceDO(cur,surfaces) if (cur) surfaces.push_back(Trk::SurfaceIntersection(Trk::Intersection(Amg::Vector3D(0.,0.,0.),0.,true),&(cur->surface(cur->identify()))))
......@@ -27,6 +30,8 @@
#define addPrevInEtaDO(cur, surfaces) addSurfaceDO(cur->prevInEta(), surfaces); addOtherSideDO(cur->prevInEta(),surfaces)
#endif // INDETTRACKINGGEOMETRY_DISCDETADDNEXTPHIETA
class SCT_ID;
namespace Trk {
class Surface;
}
......@@ -87,7 +92,7 @@ namespace InDet {
const Trk::BinnedArray<Trk::Surface>* m_bin_array;
std::vector<Trk::BinUtility*>* m_singleBinUtils;
mutable std::atomic<const SCT_ID*> m_sctIdHelper{nullptr};
};
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
*/
///////////////////////////////////////////////////////////////////
......@@ -32,18 +32,20 @@ bool InDet::DiscOverlapDescriptor::reachableSurfaces(std::vector<Trk::SurfaceInt
{
// Get Storegate, ID helpers, and so on
ISvcLocator* svcLocator = Gaudi::svcLocator();
if (m_sctIdHelper==nullptr) {
ISvcLocator* svcLocator = Gaudi::svcLocator();
// get DetectorStore service
StoreGateSvc* detStore;
StatusCode sc = svcLocator->service("DetectorStore",detStore);
if (sc.isFailure()) {
return 0;
}
// get DetectorStore service
StoreGateSvc* detStore = nullptr;
if (svcLocator->service("DetectorStore", detStore).isFailure()) {
return false;
}
const SCT_ID* sctIdHelper = 0;
if (detStore->retrieve(sctIdHelper, "SCT_ID").isFailure()) {
return 0;
const SCT_ID* sctIdHelper = nullptr;
if (detStore->retrieve(sctIdHelper, "SCT_ID").isFailure()) {
return false;
}
m_sctIdHelper = sctIdHelper;
}
// get the according detector element
......@@ -51,7 +53,7 @@ bool InDet::DiscOverlapDescriptor::reachableSurfaces(std::vector<Trk::SurfaceInt
// first add the target surface
surfaces.push_back(Trk::SurfaceIntersection(Trk::Intersection(pos, 0., true),&tsf));
int etaModule = sctIdHelper->eta_module(tsf.associatedDetectorElementIdentifier());
int etaModule = m_sctIdHelper.load()->eta_module(tsf.associatedDetectorElementIdentifier());
// return empty cell vector
if (pElement) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment