From 28d964df7a98ee3ef9dbff363f3c8716b97a2e13 Mon Sep 17 00:00:00 2001 From: scott snyder <sss@karma> Date: Tue, 18 Oct 2022 10:33:14 -0400 Subject: [PATCH] TrigT1CaloByteStream: Remove references to EventInfo. Remove references to the old EventInfo class (from unused test code...). --- .../TrigT1CaloByteStream/test/CpmErrors.cxx | 15 +++------------ .../TrigT1CaloByteStream/test/JemErrors.cxx | 15 +++------------ 2 files changed, 6 insertions(+), 24 deletions(-) diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/test/CpmErrors.cxx b/Trigger/TrigT1/TrigT1CaloByteStream/test/CpmErrors.cxx index 49f75e37f113..1e4e6efbbc8a 100755 --- a/Trigger/TrigT1/TrigT1CaloByteStream/test/CpmErrors.cxx +++ b/Trigger/TrigT1/TrigT1CaloByteStream/test/CpmErrors.cxx @@ -1,12 +1,10 @@ /* - Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ #include "GaudiKernel/MsgStream.h" #include "GaudiKernel/ISvcLocator.h" -#include "EventInfo/EventInfo.h" -#include "EventInfo/EventID.h" #include "TrigT1CaloEvent/CMXCPTob.h" #include "TrigT1CaloEvent/CMXCPHits.h" @@ -461,15 +459,8 @@ void CpmErrors::cpmTobRoiErrors(const CpmTobRoiCollection* /*crCollection*/, void CpmErrors::errorMessage(const std::string& errmsg) { - int eventNumber = 0; - const EventInfo* evInfo = 0; - StatusCode sc = evtStore()->retrieve(evInfo); - if (sc.isFailure()) { - msg(MSG::ERROR) << "No EventInfo found" << endmsg; - } else { - const EventID* evID = evInfo->event_ID(); - if (evID) eventNumber = evID->event_number(); - } + const EventContext& ctx = Gaudi::Hive::currentContext(); + int eventNumber = ctx.eventID().event_number(); msg(MSG::INFO) << "Event " << eventNumber << " has error " << errmsg << endmsg; } diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/test/JemErrors.cxx b/Trigger/TrigT1/TrigT1CaloByteStream/test/JemErrors.cxx index 566b4436aae9..011e2429f25c 100755 --- a/Trigger/TrigT1/TrigT1CaloByteStream/test/JemErrors.cxx +++ b/Trigger/TrigT1/TrigT1CaloByteStream/test/JemErrors.cxx @@ -1,12 +1,10 @@ /* - Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ #include "GaudiKernel/MsgStream.h" #include "GaudiKernel/ISvcLocator.h" -#include "EventInfo/EventInfo.h" -#include "EventInfo/EventID.h" #include "TrigT1CaloEvent/CMXEtSums.h" #include "TrigT1CaloEvent/CMXJetTob.h" @@ -627,15 +625,8 @@ void JemErrors::cmxHitsErrors(const CmxJetHitsCollection* hitCollection, void JemErrors::errorMessage(const std::string& errmsg) { - int eventNumber = 0; - const EventInfo* evInfo = 0; - StatusCode sc = evtStore()->retrieve(evInfo); - if (sc.isFailure()) { - msg(MSG::ERROR) << "No EventInfo found" << endmsg; - } else { - const EventID* evID = evInfo->event_ID(); - if (evID) eventNumber = evID->event_number(); - } + const EventContext& ctx = Gaudi::Hive::currentContext(); + int eventNumber = ctx.eventID().event_number(); msg(MSG::INFO) << "Event " << eventNumber << " has error " << errmsg << endmsg; } -- GitLab