Skip to content
Snippets Groups Projects

InDetSimEvent: Remove references to StoreGate::pointer().

Merged Scott Snyder requested to merge ssnyder/athena:pointer.InDetSimEvent-20200801 into master
1 file
+ 4
7
Compare changes
  • Side-by-side
  • Inline
@@ -6,8 +6,8 @@
#include "InDetSimEvent/SiHitIdHelper.h"
#include "StoreGate/StoreGateSvc.h"
#include "StoreGate/StoreGate.h"
#include "InDetIdentifier/PixelID.h"
#include "GaudiKernel/ServiceHandle.h"
#include "G4Types.hh"
#ifdef G4MULTITHREADED
@@ -38,12 +38,9 @@ void SiHitIdHelper::Initialize() {
// determine whether hits were created with an SLHC dictionary
// in which case eta module field is expanded.
// Need to lock this thread-unsafe retrieval
const PixelID* pix;
StoreGateSvc* detStore(nullptr);
{
std::lock_guard<std::mutex> lock(sgMutex);
detStore = StoreGate::pointer("DetectorStore");
const PixelID* pix = nullptr;
ServiceHandle<StoreGateSvc> detStore ("DetectorStore", "SiHitIdHelper");
if (detStore.retrieve().isSuccess()) {
if (detStore->retrieve(pix, "PixelID").isFailure()) { pix = 0; }
}
bool isSLHC = (pix != 0 && pix->dictionaryVersion() == "SLHC");
Loading