From 2e03c06b580bfe21fa75f269bb368b5cce62cebf Mon Sep 17 00:00:00 2001
From: John Derek Chapman <chapman@hep.phy.cam.ac.uk>
Date: Wed, 18 Nov 2015 11:59:10 +0100
Subject: [PATCH] python/MuonGM.py: ensure that TheMuonAlignmentTool is set for
 overlay jobs. ATLASSIM-1922. AtlasGeoModel-00-03-40 (AtlasGeoModel-00-03-40)

	* python/MuonGM.py: ensure that TheMuonAlignmentTool is set for
	overlay jobs. ATLASSIM-1922.
	* AtlasGeoModel-00-03-40

2015-11-16 Noemi Calace <Noemi.Calace@cern.ch>
	* Added try/except block in the GeoModelInit.py
	* AtlasGeoModel-00-03-39

2015-09-28 Noemi Calace <Noemi.Calace@cern.ch>
	* Re-added flag to not re-create the DetDescrCnvSvc
	* TODO: Make a new flag somewhere else to avoid tracking dependences in GeoModel
	* AtlasGeoModel-00-03-38
---
 .../GeoModel/AtlasGeoModel/python/GeoModelInit.py        | 9 +++++++--
 .../GeoModel/AtlasGeoModel/python/MuonGM.py              | 6 +++---
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/DetectorDescription/GeoModel/AtlasGeoModel/python/GeoModelInit.py b/DetectorDescription/GeoModel/AtlasGeoModel/python/GeoModelInit.py
index 239f8835bd6..621b50d67fa 100755
--- a/DetectorDescription/GeoModel/AtlasGeoModel/python/GeoModelInit.py
+++ b/DetectorDescription/GeoModel/AtlasGeoModel/python/GeoModelInit.py
@@ -7,8 +7,13 @@ def _setupGeoModel():
     from AthenaCommon.JobProperties import jobproperties
     from AthenaCommon.AppMgr import ServiceMgr as svcMgr
  
-    import DetDescrCnvSvc.DetStoreConfig
-    svcMgr.DetDescrCnvSvc.IdDictFromRDB = True
+    try:
+        from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags
+        if not (hasattr(svcMgr,'DetDescrCnvSvc') and TrkDetFlags.ISF_FatrasCustomGeometry()):
+            import DetDescrCnvSvc.DetStoreConfig
+            svcMgr.DetDescrCnvSvc.IdDictFromRDB = True
+    except ImportError:
+        pass
 
     # Conditions DB setup and TagInfo
     from IOVDbSvc.CondDB import conddb
diff --git a/DetectorDescription/GeoModel/AtlasGeoModel/python/MuonGM.py b/DetectorDescription/GeoModel/AtlasGeoModel/python/MuonGM.py
index 9c360006558..6057441066e 100755
--- a/DetectorDescription/GeoModel/AtlasGeoModel/python/MuonGM.py
+++ b/DetectorDescription/GeoModel/AtlasGeoModel/python/MuonGM.py
@@ -5,15 +5,15 @@ from AthenaCommon.DetFlags      import DetFlags
 
 if ( jobproperties.Global.DetGeo() == "ctbh8" or jobproperties.Global.DetGeo() == "ctbh6" ):
     print " CTB layout for Muon Spectrometer is not supported anymore"
- 
+
 elif ( DetFlags.detdescr.Muon_on() ):
     from GeoModelSvc.GeoModelSvcConf import GeoModelSvc
     GeoModelSvc = GeoModelSvc()
-   
+
     from MuonGeoModel.MuonGeoModelConf import MuonDetectorTool
     GeoModelSvc.DetectorTools += [ MuonDetectorTool() ]
     GeoModelSvc.DetectorTools[ "MuonDetectorTool" ].BuildFromNova = 0
-    if ( not DetFlags.simulate.any_on() ):
+    if ( not DetFlags.simulate.any_on() or DetFlags.overlay.any_on() ):
       GeoModelSvc.DetectorTools[ "MuonDetectorTool" ].TheMuonAlignmentTool = "MuonAlignmentDbTool/MGM_AlignmentDbTool"
     else:
       GeoModelSvc.DetectorTools[ "MuonDetectorTool" ].TheMuonAlignmentTool = ""
-- 
GitLab