From 021e1688626ce68e5faa67683820f68c789f5844 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Wed, 12 Dec 2018 18:17:14 +0100
Subject: [PATCH] Remove usage of deprecated AthenaServices.SetFatalHandler

Do not use `AthenaServices.SetFatalHandler` but instead set the
equivalent property on the CoreDumpSvc. Switch the remaining job options and
delete any comments referencing the old class.

A nice side effect is that the initial bootstrap of `athena.py` is now 3
seconds faster due to the removal of the `cppyy` import (of course this
time is spent later once the import happens at another place).
---
 .../AthenaPoolTest/share/AthenaPoolTestWrite.py  |  7 +++----
 .../AthenaPoolTest/share/EventInfoWrite.py       |  4 ----
 .../IOVDbTestAlg/share/AllReadCool.py            |  3 ---
 .../IOVDbTestAlg/share/AllWriteCool.py           |  3 ++-
 .../IOVDbTestAlg/share/IOVDbTestAlgReadCool.py   |  3 ---
 .../share/IOVDbTestAlgReadCoolAfterTwoStep.py    |  3 ---
 .../share/IOVDbTestAlgReadCoolAndReg.py          |  3 ---
 .../share/IOVDbTestAlgReadCoolFromMetaData.py    |  6 +++---
 .../share/IOVDbTestAlgReadCoolNewTag.py          |  3 ---
 .../share/IOVDbTestAlgReadCoolNoReg.py           |  4 ----
 .../share/IOVDbTestAlgReadCoolWriteMD.py         |  3 ---
 .../IOVDbTestAlg/share/IOVDbTestAlgWriteCool.py  |  3 ---
 .../share/IOVDbTestAlgWriteCoolNewTag.py         |  3 ---
 .../share/IOVDbTestAlgWriteCoolNoReg.py          |  4 ----
 .../share/IOVDbTestAlgWriteCoolStep2.py          |  3 ---
 .../share/IOVDbTestAlgWriteCoolStep3.py          |  3 ---
 Control/AthenaCommon/share/Preparation.py        | 16 ----------------
 .../PixelCabling/run/dumpCabling_jobOptions.py   |  2 --
 .../PixelCabling/run/readCabling_jobOptions.py   |  2 --
 .../share/Pixel_main.py                          |  3 +--
 .../InDetRecExample/share/InDetRec_all.py        |  2 +-
 .../share/jobOptionsNewSteering.py               |  4 ++--
 .../share/jobOptions_RTT_InDetTrigRecExample.py  |  2 +-
 ...tions_RTT_InDetTrigRecExample_backTracking.py |  4 ++--
 ...obOptions_RTT_InDetTrigRecExample_doReadBS.py |  4 ++--
 .../PixelToTPIDTool/share/PixeldEdxWriteCool.py  |  4 ----
 .../share/AnalysisCommon_topOptions.py           |  1 -
 .../RecExCommon/share/RecExCommon_topOptions.py  |  1 -
 .../share/L1Simulation_topOptions.py             |  1 -
 29 files changed, 17 insertions(+), 87 deletions(-)

diff --git a/AtlasTest/DatabaseTest/AthenaPoolTest/share/AthenaPoolTestWrite.py b/AtlasTest/DatabaseTest/AthenaPoolTest/share/AthenaPoolTestWrite.py
index 6c247246540..5fc8b48b339 100755
--- a/AtlasTest/DatabaseTest/AthenaPoolTest/share/AthenaPoolTestWrite.py
+++ b/AtlasTest/DatabaseTest/AthenaPoolTest/share/AthenaPoolTestWrite.py
@@ -13,10 +13,6 @@
 ## basic job configuration (for generator)
 import AthenaCommon.AtlasUnixGeneratorJob
 
-# Set handler for traceback
-gbl.AthenaServices.SetFatalHandler(438)
-
-
 ## get a handle to the default top-level algorithm sequence
 from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
@@ -27,6 +23,9 @@ from AthenaCommon.AppMgr import ServiceMgr as svcMgr
 ## get a handle to the ApplicationManager
 from AthenaCommon.AppMgr import theApp
 
+# Set handler for traceback
+svcMgr.CoreDumpSvc.FatalHandler = 438
+
 #--------------------------------------------------------------
 # Load POOL support
 #--------------------------------------------------------------
diff --git a/AtlasTest/DatabaseTest/AthenaPoolTest/share/EventInfoWrite.py b/AtlasTest/DatabaseTest/AthenaPoolTest/share/EventInfoWrite.py
index af7bd07c828..4efa3fc4e2a 100755
--- a/AtlasTest/DatabaseTest/AthenaPoolTest/share/EventInfoWrite.py
+++ b/AtlasTest/DatabaseTest/AthenaPoolTest/share/EventInfoWrite.py
@@ -13,10 +13,6 @@
 ## basic job configuration (for generator)
 import AthenaCommon.AtlasUnixGeneratorJob
 
-# Set handler for traceback
-#gbl.AthenaServices.SetFatalHandler(438)
-
-
 ## get a handle to the default top-level algorithm sequence
 from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
diff --git a/AtlasTest/DatabaseTest/IOVDbTestAlg/share/AllReadCool.py b/AtlasTest/DatabaseTest/IOVDbTestAlg/share/AllReadCool.py
index acf11bd9002..978e94b7686 100755
--- a/AtlasTest/DatabaseTest/IOVDbTestAlg/share/AllReadCool.py
+++ b/AtlasTest/DatabaseTest/IOVDbTestAlg/share/AllReadCool.py
@@ -7,9 +7,6 @@
 ## basic job configuration (for generator)
 import AthenaCommon.AtlasUnixGeneratorJob
 
-# Set handler for traceback
-#gbl.AthenaServices.SetFatalHandler(438)
-
 #import password for devdb10 from devdb10pwd.py
 from devdb10_pwd import devdb10pwd
 
diff --git a/AtlasTest/DatabaseTest/IOVDbTestAlg/share/AllWriteCool.py b/AtlasTest/DatabaseTest/IOVDbTestAlg/share/AllWriteCool.py
index 282f4cd98d0..4a38dbff0a5 100755
--- a/AtlasTest/DatabaseTest/IOVDbTestAlg/share/AllWriteCool.py
+++ b/AtlasTest/DatabaseTest/IOVDbTestAlg/share/AllWriteCool.py
@@ -1,5 +1,4 @@
 import AthenaCommon.AtlasUnixGeneratorJob
-gbl.AthenaServices.SetFatalHandler(438)
 from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
 from AthenaCommon.AppMgr import ServiceMgr as svcMgr
@@ -10,6 +9,8 @@ from devdb10_pwd import devdb10pwd
 
 import IOVDbSvc.IOVDb
 
+svcMgr.CoreDumpSvc.FatalHandler = 438
+
 from IOVDbTestAlg.IOVDbTestAlgConf import IOVDbTestAlg
 topSequence += IOVDbTestAlg( "IOVDbTestAlg" )
 
diff --git a/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgReadCool.py b/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgReadCool.py
index 0f988a2ba80..cc9e6a4da26 100755
--- a/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgReadCool.py
+++ b/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgReadCool.py
@@ -7,9 +7,6 @@
 ## basic job configuration (for generator)
 import AthenaCommon.AtlasUnixGeneratorJob
 
-# Set handler for traceback
-#gbl.AthenaServices.SetFatalHandler(438)
-
 ## get a handle to the default top-level algorithm sequence
 from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
diff --git a/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgReadCoolAfterTwoStep.py b/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgReadCoolAfterTwoStep.py
index 5e65fb0af50..91f6f272533 100755
--- a/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgReadCoolAfterTwoStep.py
+++ b/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgReadCoolAfterTwoStep.py
@@ -6,9 +6,6 @@
 ## basic job configuration (for generator)
 import AthenaCommon.AtlasUnixGeneratorJob
 
-# Set handler for traceback
-#gbl.AthenaServices.SetFatalHandler(438)
-
 ## get a handle to the default top-level algorithm sequence
 from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
diff --git a/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgReadCoolAndReg.py b/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgReadCoolAndReg.py
index d0d1372a0c8..512575927b3 100755
--- a/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgReadCoolAndReg.py
+++ b/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgReadCoolAndReg.py
@@ -7,9 +7,6 @@
 ## basic job configuration (for generator)
 import AthenaCommon.AtlasUnixGeneratorJob
 
-# Set handler for traceback
-#gbl.AthenaServices.SetFatalHandler(438)
-
 ## get a handle to the default top-level algorithm sequence
 from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
diff --git a/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgReadCoolFromMetaData.py b/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgReadCoolFromMetaData.py
index 51194796060..f1328760141 100644
--- a/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgReadCoolFromMetaData.py
+++ b/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgReadCoolFromMetaData.py
@@ -6,9 +6,6 @@
 ## basic job configuration
 import AthenaCommon.AtlasUnixStandardJob
 
-# Set handler for traceback
-gbl.AthenaServices.SetFatalHandler(438)
-
 ## get a handle on the default top-level algorithm sequence
 from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
@@ -31,6 +28,9 @@ from AthenaCommon.AppMgr import ServiceMgr as svcMgr
 ## get a handle on the ToolSvc
 from AthenaCommon.AppMgr import ToolSvc
 
+# Set handler for traceback
+svcMgr.CoreDumpSvc.FatalHandler = 438
+
 #svcMgr.EventSelector.InputCollections = [ "SimplePoolFile1.root" ]
 svcMgr.EventSelector.InputCollections = [ "SimpleEventPoolFile.root" ]
 
diff --git a/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgReadCoolNewTag.py b/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgReadCoolNewTag.py
index 8e88b4f9e96..c42d7927035 100644
--- a/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgReadCoolNewTag.py
+++ b/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgReadCoolNewTag.py
@@ -7,9 +7,6 @@
 ## basic job configuration (for generator)
 import AthenaCommon.AtlasUnixGeneratorJob
 
-# Set handler for traceback
-#gbl.AthenaServices.SetFatalHandler(438)
-
 ## get a handle to the default top-level algorithm sequence
 from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
diff --git a/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgReadCoolNoReg.py b/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgReadCoolNoReg.py
index a13ba7d6fcc..cc5d7d3a317 100755
--- a/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgReadCoolNoReg.py
+++ b/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgReadCoolNoReg.py
@@ -7,10 +7,6 @@
 ## basic job configuration (for generator)
 import AthenaCommon.AtlasUnixGeneratorJob
 
-# Set handler for traceback
-#gbl.AthenaServices.SetFatalHandler(438)
-
-
 ## get a handle to the default top-level algorithm sequence
 from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
diff --git a/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgReadCoolWriteMD.py b/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgReadCoolWriteMD.py
index c60f585d421..bec0bb629a3 100644
--- a/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgReadCoolWriteMD.py
+++ b/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgReadCoolWriteMD.py
@@ -7,9 +7,6 @@
 ## basic job configuration (for generator)
 import AthenaCommon.AtlasUnixGeneratorJob
 
-# Set handler for traceback
-#gbl.AthenaServices.SetFatalHandler(438)
-
 ## get a handle to the default top-level algorithm sequence
 from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
diff --git a/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgWriteCool.py b/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgWriteCool.py
index fa7b4746d40..5a2911b776f 100755
--- a/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgWriteCool.py
+++ b/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgWriteCool.py
@@ -7,9 +7,6 @@
 ## basic job configuration (for generator)
 import AthenaCommon.AtlasUnixGeneratorJob
 
-# Set handler for traceback
-#gbl.AthenaServices.SetFatalHandler(438)
-
 ## get a handle to the default top-level algorithm sequence
 from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
diff --git a/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgWriteCoolNewTag.py b/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgWriteCoolNewTag.py
index 18e6b225a31..cd6fdbdd274 100644
--- a/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgWriteCoolNewTag.py
+++ b/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgWriteCoolNewTag.py
@@ -7,9 +7,6 @@
 ## basic job configuration (for generator)
 import AthenaCommon.AtlasUnixGeneratorJob
 
-# Set handler for traceback
-#gbl.AthenaServices.SetFatalHandler(438)
-
 ## get a handle to the default top-level algorithm sequence
 from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
diff --git a/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgWriteCoolNoReg.py b/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgWriteCoolNoReg.py
index 0329d150b13..06ad40ade26 100755
--- a/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgWriteCoolNoReg.py
+++ b/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgWriteCoolNoReg.py
@@ -7,10 +7,6 @@
 ## basic job configuration (for generator)
 import AthenaCommon.AtlasUnixGeneratorJob
 
-# Set handler for traceback
-#gbl.AthenaServices.SetFatalHandler(438)
-
-
 ## get a handle to the default top-level algorithm sequence
 from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
diff --git a/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgWriteCoolStep2.py b/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgWriteCoolStep2.py
index 42b834a9f0c..8d3508f7def 100755
--- a/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgWriteCoolStep2.py
+++ b/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgWriteCoolStep2.py
@@ -7,9 +7,6 @@
 ## basic job configuration (for generator)
 import AthenaCommon.AtlasUnixGeneratorJob
 
-# Set handler for traceback
-#gbl.AthenaServices.SetFatalHandler(438)
-
 ## get a handle to the default top-level algorithm sequence
 from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
diff --git a/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgWriteCoolStep3.py b/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgWriteCoolStep3.py
index 872b368e51c..f2baa769360 100755
--- a/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgWriteCoolStep3.py
+++ b/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgWriteCoolStep3.py
@@ -7,9 +7,6 @@
 ## basic job configuration (for generator)
 import AthenaCommon.AtlasUnixGeneratorJob
 
-# Set handler for traceback
-#gbl.AthenaServices.SetFatalHandler(438)
-
 ## get a handle to the default top-level algorithm sequence
 from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
diff --git a/Control/AthenaCommon/share/Preparation.py b/Control/AthenaCommon/share/Preparation.py
index 480815d784d..0a4786ea1ed 100644
--- a/Control/AthenaCommon/share/Preparation.py
+++ b/Control/AthenaCommon/share/Preparation.py
@@ -81,22 +81,6 @@ if min_cppyy_vmem_growth:
    del vmem_before_cppyy
 del min_cppyy_vmem_growth, grow_vmem, vmem_mb
 
-from cppyy import gbl
-## backward compat...
-class _AthenaServicesDictBwd:
-  @staticmethod
-  def SetFatalHandler(flags=-1):
-     import AthenaCommon.Logging as L
-     info = L.log.info
-     info("'gbl.AthenaServices.SetFatalHandler(flag)' is DEPRECATED")
-     info("instead, please consider using:")
-     info(" svcMgr.CoreDumpSvc.FatalHandler = flag")
-
-     from AthenaCommon.AppMgr import ServiceMgr as svcMgr
-     svcMgr.CoreDumpSvc.FatalHandler = flags
-setattr(gbl, 'AthenaServices', _AthenaServicesDictBwd)
-del _AthenaServicesDictBwd
-## end --
 if not (not opts.run_batch and theApp.EventLoop == "PyAthenaEventLoopMgr"):
    # make SIG_INT fatal
    svcMgr.CoreDumpSvc.FatalHandler = -1
diff --git a/InnerDetector/InDetDetDescr/PixelCabling/run/dumpCabling_jobOptions.py b/InnerDetector/InDetDetDescr/PixelCabling/run/dumpCabling_jobOptions.py
index 9dbdab7fea1..99a94377c32 100644
--- a/InnerDetector/InDetDetDescr/PixelCabling/run/dumpCabling_jobOptions.py
+++ b/InnerDetector/InDetDetDescr/PixelCabling/run/dumpCabling_jobOptions.py
@@ -4,8 +4,6 @@
 ## basic job configuration (for generator)
 import AthenaCommon.AtlasUnixGeneratorJob
 
-# Set handler for traceback
-#gbl.AthenaServices.SetFatalHandler(438)
 from AthenaCommon.GlobalFlags import globalflags
 globalflags.DataSource = 'data'
 
diff --git a/InnerDetector/InDetDetDescr/PixelCabling/run/readCabling_jobOptions.py b/InnerDetector/InDetDetDescr/PixelCabling/run/readCabling_jobOptions.py
index 3c256dfb85b..51280c9fe8f 100644
--- a/InnerDetector/InDetDetDescr/PixelCabling/run/readCabling_jobOptions.py
+++ b/InnerDetector/InDetDetDescr/PixelCabling/run/readCabling_jobOptions.py
@@ -4,8 +4,6 @@
 ## basic job configuration (for generator)
 import AthenaCommon.AtlasUnixGeneratorJob
 
-# Set handler for traceback
-#gbl.AthenaServices.SetFatalHandler(438)
 from AthenaCommon.GlobalFlags import globalflags
 globalflags.DataSource = 'data'
 
diff --git a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/share/Pixel_main.py b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/share/Pixel_main.py
index 0d8ee8434c3..3fd5d4d3c62 100644
--- a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/share/Pixel_main.py
+++ b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/share/Pixel_main.py
@@ -115,8 +115,7 @@ ServiceMgr.StoreGateSvc.Dump            = False
 # get stack dump
 # ------------------------------------------------------------
 
-gbl.AthenaServices.SetFatalHandler(438)
-
+ServiceMgr.CoreDumpSvc.FatalHandler = 438
 
 # ------------------------------------------------------------
 # Use auditors
diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetRec_all.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetRec_all.py
index 43fa4afd364..95ab8547b58 100755
--- a/InnerDetector/InDetExample/InDetRecExample/share/InDetRec_all.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetRec_all.py
@@ -138,7 +138,7 @@ ServiceMgr.StoreGateSvc.Dump            = False
 # get stack dump
 # ------------------------------------------------------------
 
-gbl.AthenaServices.SetFatalHandler(438)
+ServiceMgr.CoreDumpSvc.FatalHandler = 438
 
 #--------------------------------------------------------------
 # run JiveXML for Atlantis event display
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptionsNewSteering.py b/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptionsNewSteering.py
index 33de8b9bc15..def20c510f7 100755
--- a/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptionsNewSteering.py
+++ b/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptionsNewSteering.py
@@ -364,8 +364,8 @@ ServiceMgr.StoreGateSvc.Dump            = False
 # get stack dump
 # ------------------------------------------------------------
 
-gbl.AthenaServices.SetFatalHandler(438)
-         
+ServiceMgr.CoreDumpSvc.FatalHandler = 438
+
 if doAuditors:
  # load AuditorSvc
  theAuditorSvc = AuditorSvc()
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptions_RTT_InDetTrigRecExample.py b/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptions_RTT_InDetTrigRecExample.py
index 844fce15c95..370a1ac7b89 100755
--- a/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptions_RTT_InDetTrigRecExample.py
+++ b/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptions_RTT_InDetTrigRecExample.py
@@ -363,7 +363,7 @@ ServiceMgr.StoreGateSvc.Dump            = False
 # get stack dump
 # ------------------------------------------------------------
 
-gbl.AthenaServices.SetFatalHandler(438)
+ServiceMgr.CoreDumpSvc.FatalHandler = 438
          
 if doAuditors:
  # load AuditorSvc
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptions_RTT_InDetTrigRecExample_backTracking.py b/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptions_RTT_InDetTrigRecExample_backTracking.py
index 95ec2cb520f..44aa7c83f0d 100755
--- a/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptions_RTT_InDetTrigRecExample_backTracking.py
+++ b/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptions_RTT_InDetTrigRecExample_backTracking.py
@@ -316,8 +316,8 @@ ServiceMgr.StoreGateSvc.Dump            = False
 # get stack dump
 # ------------------------------------------------------------
 
-gbl.AthenaServices.SetFatalHandler(438)
-         
+ServiceMgr.CoreDumpSvc.FatalHandler = 438
+
 if doAuditors:
  # load AuditorSvc
  theAuditorSvc = AuditorSvc()
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptions_RTT_InDetTrigRecExample_doReadBS.py b/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptions_RTT_InDetTrigRecExample_doReadBS.py
index 0ec9c1afe9f..b44c7b1593a 100755
--- a/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptions_RTT_InDetTrigRecExample_doReadBS.py
+++ b/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptions_RTT_InDetTrigRecExample_doReadBS.py
@@ -366,8 +366,8 @@ ServiceMgr.StoreGateSvc.Dump            = False
 # get stack dump
 # ------------------------------------------------------------
 
-gbl.AthenaServices.SetFatalHandler(438)
-         
+ServiceMgr.CoreDumpSvc.FatalHandler = 438
+
 if doAuditors:
  # load AuditorSvc
  theAuditorSvc = AuditorSvc()
diff --git a/InnerDetector/InDetRecTools/PixelToTPIDTool/share/PixeldEdxWriteCool.py b/InnerDetector/InDetRecTools/PixelToTPIDTool/share/PixeldEdxWriteCool.py
index d8f6a3b29ab..49a6f70bb9d 100755
--- a/InnerDetector/InDetRecTools/PixelToTPIDTool/share/PixeldEdxWriteCool.py
+++ b/InnerDetector/InDetRecTools/PixelToTPIDTool/share/PixeldEdxWriteCool.py
@@ -7,10 +7,6 @@
 ## basic job configuration (for generator)
 import AthenaCommon.AtlasUnixGeneratorJob
 
-# Set handler for traceback
-#gbl.AthenaServices.SetFatalHandler(438)
-
-
 ## get a handle to the default top-level algorithm sequence
 from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
diff --git a/Reconstruction/RecExample/RecExCommon/share/AnalysisCommon_topOptions.py b/Reconstruction/RecExample/RecExCommon/share/AnalysisCommon_topOptions.py
index 2e2f17f498e..f338c8e1576 100644
--- a/Reconstruction/RecExample/RecExCommon/share/AnalysisCommon_topOptions.py
+++ b/Reconstruction/RecExample/RecExCommon/share/AnalysisCommon_topOptions.py
@@ -4,7 +4,6 @@ include.block ("RecExCommon/AnalysisCommon_topOptions.py")
 ## Common job preparation ##
 ############################
 
-# gbl.AthenaServices.SetFatalHandler(438)
 svcMgr.CoreDumpSvc.FatalHandler = 438
 import traceback
 
diff --git a/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py b/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py
index 0cf0bb11024..c187b44259f 100644
--- a/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py
+++ b/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py
@@ -4,7 +4,6 @@ include.block ("RecExCommon/RecExCommon_topOptions.py")
 ## Common job preparation ##
 ############################
 
-# gbl.AthenaServices.SetFatalHandler(438)
 svcMgr.CoreDumpSvc.FatalHandler = 438
 import traceback
 
diff --git a/Trigger/TrigT1/L1Topo/L1TopoSimulation/share/L1Simulation_topOptions.py b/Trigger/TrigT1/L1Topo/L1TopoSimulation/share/L1Simulation_topOptions.py
index 3adcb674d2e..b4c57f5de58 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoSimulation/share/L1Simulation_topOptions.py
+++ b/Trigger/TrigT1/L1Topo/L1TopoSimulation/share/L1Simulation_topOptions.py
@@ -1,6 +1,5 @@
 include.block ("L1TopoSimulation/L1Simulation_topOptions.py")
 
-# gbl.AthenaServices.SetFatalHandler(438)
 svcMgr.CoreDumpSvc.FatalHandler = 438
 import traceback
 
-- 
GitLab