From d33d1dde28c68eb6b34533cbbf33fcba98e1296a Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Thu, 31 Jan 2019 16:30:59 +0100
Subject: [PATCH] TrigConfigSvc: VarHandle migration.

Change TrigConfDataIOVChanger get the run number from EventContext,
rather than doing a retrieve of EventInfo.
---
 .../TrigConfigSvc/src/TrigConfDataIOVChanger.cxx   | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/Trigger/TrigConfiguration/TrigConfigSvc/src/TrigConfDataIOVChanger.cxx b/Trigger/TrigConfiguration/TrigConfigSvc/src/TrigConfDataIOVChanger.cxx
index 7b9a16811868..dae370ed3a90 100644
--- a/Trigger/TrigConfiguration/TrigConfigSvc/src/TrigConfDataIOVChanger.cxx
+++ b/Trigger/TrigConfiguration/TrigConfigSvc/src/TrigConfDataIOVChanger.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 /**************************************************************************
@@ -39,6 +39,7 @@
 #include "AthenaPoolUtilities/CondAttrListCollection.h"
 
 #include "TrigConfInterfaces/ITrigConfigSvc.h"
+#include "GaudiKernel/ThreadLocalContext.h"
 
 #define TRIGGER_CONF_HLTMENU  "/TRIGGER/HLT/Menu"
 #define TRIGGER_CONF_HLTKEYS  "/TRIGGER/HLT/HltConfigKeys"
@@ -91,15 +92,8 @@ StatusCode
 TrigConf::TrigConfDataIOVChanger::execute() {
 
    // First get the runnumber:
-   const EventInfo* eventInfo = 0;
-   CHECK(m_storeGate->retrieve(eventInfo));
-
-   if (!eventInfo) {
-      ATH_MSG_ERROR("EventInfo from storegate is 0");
-      return StatusCode::FAILURE;
-   }
-
-   unsigned int runNumber = eventInfo->event_ID()->run_number();
+   const EventContext& ctx = Gaudi::Hive::currentContext();
+   unsigned int runNumber = ctx.eventID().run_number();
   
    if(m_LastRun == runNumber)       // already executed in this run?
       return StatusCode::SUCCESS;
-- 
GitLab