From 91a99611a7e1744295cbb5e9c462e338084d646a Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Tue, 8 Oct 2019 17:25:58 +0200
Subject: [PATCH] AthenaServices: Use out-of-line extended context methods.

Use out-of-line methods from AthenaKernel to get/set the extended event context.
---
 Control/AthenaServices/src/AthenaEventLoopMgr.cxx     | 5 +++--
 Control/AthenaServices/src/AthenaHiveEventLoopMgr.cxx | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/Control/AthenaServices/src/AthenaEventLoopMgr.cxx b/Control/AthenaServices/src/AthenaEventLoopMgr.cxx
index 5e60b985909..49aa994053b 100644
--- a/Control/AthenaServices/src/AthenaEventLoopMgr.cxx
+++ b/Control/AthenaServices/src/AthenaEventLoopMgr.cxx
@@ -1226,8 +1226,9 @@ StatusCode AthenaEventLoopMgr::installEventContext (EventContext& ctx,
   ctx.setEventID(pEvent);
   ctx.set(m_nev,0);
 
-  ctx.setExtension( Atlas::ExtendedEventContext( eventStore()->hiveProxyDict(),
-                                                 conditionsRun) );
+  Atlas::setExtendedEventContext(ctx,
+                                 Atlas::ExtendedEventContext( eventStore()->hiveProxyDict(),
+                                                              conditionsRun) );
   Gaudi::Hive::setCurrentContext( ctx );
 
   m_aess->reset( ctx );
diff --git a/Control/AthenaServices/src/AthenaHiveEventLoopMgr.cxx b/Control/AthenaServices/src/AthenaHiveEventLoopMgr.cxx
index a14f820fd9a..b5dc6cbc57d 100644
--- a/Control/AthenaServices/src/AthenaHiveEventLoopMgr.cxx
+++ b/Control/AthenaServices/src/AthenaHiveEventLoopMgr.cxx
@@ -627,7 +627,7 @@ StatusCode AthenaHiveEventLoopMgr::executeEvent( EventContext &&ctx )
       conditionsRun = (*attr)["ConditionsRun"].data<unsigned int>();
     }
   }
-  ctx.template getExtension<Atlas::ExtendedEventContext>().setConditionsRun (conditionsRun);
+  Atlas::getExtendedEventContext(ctx).setConditionsRun (conditionsRun);
   Gaudi::Hive::setCurrentContext ( ctx );
 
   // Record EventContext in current whiteboard
@@ -1218,7 +1218,8 @@ EventContext AthenaHiveEventLoopMgr::createEventContext() {
             << " could not be selected for the WhiteBoard" << endmsg;
     return EventContext{};       // invalid EventContext
   } else {
-    ctx.setExtension( Atlas::ExtendedEventContext( eventStore()->hiveProxyDict() ) );
+    Atlas::setExtendedEventContext(ctx,
+                                   Atlas::ExtendedEventContext( eventStore()->hiveProxyDict() ) );
 
     debug() << "created EventContext, num: " << ctx.evt()  << "  in slot: " 
 	    << ctx.slot() << endmsg;
-- 
GitLab