Skip to content
Snippets Groups Projects
Commit f03b4f25 authored by Scott Snyder's avatar Scott Snyder Committed by scott snyder
Browse files

GeoModelExamples: Avoid use of non-bound DataHandle.

Deprecating use of non-bound DataHandle, especially non-const.
Also adding const for materials.
parent 9b6d2458
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-2018 CERN for the benefit of the ATLAS collaboration
*/
#include "ToyDetectorFactory.h"
......@@ -21,7 +21,6 @@
#include "CLHEP/GenericFunctions/Sin.hh"
#include "CLHEP/GenericFunctions/Cos.hh"
#include "StoreGate/StoreGateSvc.h"
#include "StoreGate/DataHandle.h"
#include "GeoModelInterfaces/StoredMaterialManager.h"
using namespace Genfun;
......@@ -50,7 +49,7 @@ void ToyDetectorFactory::create(GeoPhysVol *world)
{
m_detectorManager=new ToyDetectorManager();
DataHandle<StoredMaterialManager> materialManager;
const StoredMaterialManager* materialManager = nullptr;
if (StatusCode::SUCCESS != m_detectorStore->retrieve(materialManager, std::string("MATERIALS"))) {
return;
}
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
*/
#include "ToyDetectorTool.h"
......@@ -42,7 +42,7 @@ ToyDetectorTool::create()
//
// Locate the top level experiment node
//
DataHandle<GeoModelExperiment> theExpt;
GeoModelExperiment* theExpt = nullptr;
if (StatusCode::SUCCESS != detStore()->retrieve( theExpt, "ATLAS" )) {
log << MSG::ERROR
<< "Could not find GeoModelExperiment ATLAS"
......
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