From a2392dd3d01a23df23a24d926a05a3e43a7f17ed Mon Sep 17 00:00:00 2001
From: Rafal Bielski <rafal.bielski@cern.ch>
Date: Wed, 30 Sep 2020 15:49:48 +0200
Subject: [PATCH] MTCalibPebConfig.py: call getHLTConfigSvc and always add it
 to svcMgr

---
 .../TrigExPartialEB/python/MTCalibPebConfig.py            | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/HLT/Trigger/TrigControl/TrigExamples/TrigExPartialEB/python/MTCalibPebConfig.py b/HLT/Trigger/TrigControl/TrigExamples/TrigExPartialEB/python/MTCalibPebConfig.py
index 9a328f352eb..b2ba3f8023f 100644
--- a/HLT/Trigger/TrigControl/TrigExamples/TrigExPartialEB/python/MTCalibPebConfig.py
+++ b/HLT/Trigger/TrigControl/TrigExamples/TrigExPartialEB/python/MTCalibPebConfig.py
@@ -271,10 +271,10 @@ def configure_hlt_result(hypo_algs):
 
     # Give the menu json name to HLTConfigSvc
     from AthenaCommon.AppMgr import ServiceMgr as svcMgr
-    if not hasattr(svcMgr, 'HLTConfigSvc'):
-        from TrigConfigSvc.TrigConfigSvcConfig import HLTConfigSvc
-        svcMgr += HLTConfigSvc()
-    svcMgr.HLTConfigSvc.JsonFileName = menu_json
+    from TrigConfigSvc.TrigConfigSvcCfg import getHLTConfigSvc
+    hltConfigSvc = getHLTConfigSvc(ConfigFlags)
+    hltConfigSvc.JsonFileName = menu_json
+    svcMgr += hltConfigSvc
 
     # Tool adding stream tags to HLT result
     stmaker = StreamTagMakerToolCfg()
-- 
GitLab