From 171b9c5ab60225555aec212e2e2c423e5bdec748 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Wed, 8 Jun 2022 10:37:32 +0200
Subject: [PATCH] AtlasGeometryCommon: make MaterialManager non-const

Adapt to interface changes of `StoredMaterialManager`.
---
 .../BeamPipeGeoModel/src/BeamPipeDetectorFactory.h              | 2 +-
 .../CavernInfraGeoModel/src/CavernInfraDetectorFactory.cxx      | 2 +-
 .../CavernInfraGeoModel/src/CavernInfraDetectorFactory01.cxx    | 2 +-
 .../GeoModelEnvelopes/src/ForDetEnvelopeFactory.h               | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/AtlasGeometryCommon/BeamPipeGeoModel/src/BeamPipeDetectorFactory.h b/AtlasGeometryCommon/BeamPipeGeoModel/src/BeamPipeDetectorFactory.h
index fee0384f903c..769882931922 100755
--- a/AtlasGeometryCommon/BeamPipeGeoModel/src/BeamPipeDetectorFactory.h
+++ b/AtlasGeometryCommon/BeamPipeGeoModel/src/BeamPipeDetectorFactory.h
@@ -70,7 +70,7 @@ class BeamPipeDetectorFactory final : public GeoVDetectorFactory
   // The manager:
   BeamPipeDetectorManager     * m_detectorManager;
    
-  const StoredMaterialManager * m_materialManager;
+  StoredMaterialManager * m_materialManager;
 
   StoreGateSvc             * m_detectorStore;
   IRDBAccessSvc            * m_access;
diff --git a/AtlasGeometryCommon/CavernInfraGeoModel/src/CavernInfraDetectorFactory.cxx b/AtlasGeometryCommon/CavernInfraGeoModel/src/CavernInfraDetectorFactory.cxx
index bc5ee1698edc..fa9c56e7b62c 100755
--- a/AtlasGeometryCommon/CavernInfraGeoModel/src/CavernInfraDetectorFactory.cxx
+++ b/AtlasGeometryCommon/CavernInfraGeoModel/src/CavernInfraDetectorFactory.cxx
@@ -43,7 +43,7 @@ void CavernInfraDetectorFactory::create(GeoPhysVol *world)
 { 
   m_detectorManager=new CavernInfraDetectorManager();
 
-  const StoredMaterialManager* materialManager = nullptr;
+  StoredMaterialManager* materialManager = nullptr;
   if (StatusCode::SUCCESS != m_detectorStore->retrieve(materialManager, std::string("MATERIALS"))) {
     return; 
   } 
diff --git a/AtlasGeometryCommon/CavernInfraGeoModel/src/CavernInfraDetectorFactory01.cxx b/AtlasGeometryCommon/CavernInfraGeoModel/src/CavernInfraDetectorFactory01.cxx
index 6c27cffa84a3..285147c67241 100755
--- a/AtlasGeometryCommon/CavernInfraGeoModel/src/CavernInfraDetectorFactory01.cxx
+++ b/AtlasGeometryCommon/CavernInfraGeoModel/src/CavernInfraDetectorFactory01.cxx
@@ -57,7 +57,7 @@ void CavernInfraDetectorFactory01::create(GeoPhysVol *world)
 { 
   m_detectorManager=new CavernInfraDetectorManager();
 
-  const StoredMaterialManager* materialManager = nullptr;
+  StoredMaterialManager* materialManager = nullptr;
   if (StatusCode::SUCCESS != m_detectorStore->retrieve(materialManager, std::string("MATERIALS"))) {
     return; 
   } 
diff --git a/AtlasGeometryCommon/GeoModelEnvelopes/src/ForDetEnvelopeFactory.h b/AtlasGeometryCommon/GeoModelEnvelopes/src/ForDetEnvelopeFactory.h
index ac7b7f7af732..30ad70420257 100755
--- a/AtlasGeometryCommon/GeoModelEnvelopes/src/ForDetEnvelopeFactory.h
+++ b/AtlasGeometryCommon/GeoModelEnvelopes/src/ForDetEnvelopeFactory.h
@@ -37,7 +37,7 @@ class ForDetEnvelopeFactory final : public GeoVDetectorFactory
   // The manager:
   ForDetEnvelopeManager*   m_detectorManager;
    
-  const StoredMaterialManager* m_materialManager;
+  StoredMaterialManager* m_materialManager;
   StoreGateSvc*             m_detectorStore;
 };
 
-- 
GitLab