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

AFP_GeoModel: Avoid use of non-bound DataHandle.

Deprecating use of non-bound DataHandle, especially non-const.


Former-commit-id: 8d7ef871
parent e35d1f0a
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 "AFP_GeoModelFactory.h"
......@@ -17,7 +17,6 @@
#include "CLHEP/GenericFunctions/Sin.hh"
#include "CLHEP/GenericFunctions/Cos.hh"
#include "StoreGate/StoreGateSvc.h"
#include "StoreGate/DataHandle.h"
#include "GeoModelUtilities/GeoOpticalPhysVol.h"
#include "GeoModelInterfaces/StoredMaterialManager.h"
......@@ -62,7 +61,7 @@ void AFP_GeoModelFactory::DefineMaterials()
std::string matName;
GeoMaterialPropertiesTable *pMPT=NULL;
DataHandle<StoredMaterialManager> materialManager;
const StoredMaterialManager* materialManager = nullptr;
if (StatusCode::SUCCESS != m_detectorStore->retrieve(materialManager, std::string("MATERIALS"))) {
return;
}
......@@ -85,8 +84,8 @@ void AFP_GeoModelFactory::DefineMaterials()
// vacuum
matName = "std::Vacuum";
GeoMaterial *vacuum = materialManager->getMaterial(matName);
m_MapMaterials.insert(std::pair<std::string,GeoMaterial*>(matName,vacuum));
const GeoMaterial *vacuum = materialManager->getMaterial(matName);
m_MapMaterials.emplace(matName,vacuum);
// optical vacuum
matName = "OpticalVacuum";
......
/*
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 "GeoModelUtilities/GeoModelExperiment.h"
......@@ -188,7 +188,7 @@ StatusCode AFP_GeoModelTool::create()
//
// Locate the top level experiment node
//
DataHandle<GeoModelExperiment> theExpt;
GeoModelExperiment* theExpt = nullptr;
StatusCode sc = detStore()->retrieve( theExpt, "ATLAS" );
if (StatusCode::SUCCESS != sc)
{
......
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