diff --git a/Trigger/TrigSteer/DecisionHandling/CMakeLists.txt b/Trigger/TrigSteer/DecisionHandling/CMakeLists.txt index bc4fa0e1618b28426c938a9017556b3a09bfd66c..df1e4db654b140bdc1f0c3d7bc3595f5fd30dca1 100644 --- a/Trigger/TrigSteer/DecisionHandling/CMakeLists.txt +++ b/Trigger/TrigSteer/DecisionHandling/CMakeLists.txt @@ -27,7 +27,7 @@ atlas_add_component( DecisionHandling src/TestHypoTool.cxx src/TestHypoAlg.cxx src/PassFilter.cxx - LINK_LIBRARIES DecisionHandlingLib xAODTrigCalo AthViews xAODTracking xAODJet ) + LINK_LIBRARIES DecisionHandlingLib AthenaKernel xAODTrigCalo AthViews xAODTracking xAODJet ) atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) atlas_install_joboptions( share/*.py ) diff --git a/Trigger/TrigSteer/DecisionHandling/src/PassFilter.cxx b/Trigger/TrigSteer/DecisionHandling/src/PassFilter.cxx index 6b89d26bb40a1f1098e4e45b655753197a4576a2..e1f25410f6708339d9766519dabb13ebf6d2ddf7 100644 --- a/Trigger/TrigSteer/DecisionHandling/src/PassFilter.cxx +++ b/Trigger/TrigSteer/DecisionHandling/src/PassFilter.cxx @@ -3,6 +3,8 @@ */ #include "PassFilter.h" +#include "AthenaKernel/Timeout.h" +#include "AthenaKernel/AthStatusCode.h" PassFilter::PassFilter(const std::string& name, ISvcLocator* pSvcLocator) : AthReentrantAlgorithm(name, pSvcLocator) @@ -23,8 +25,12 @@ StatusCode PassFilter::finalize() return StatusCode::SUCCESS; } -StatusCode PassFilter::execute(const EventContext&) const +StatusCode PassFilter::execute(const EventContext& ctx) const { + if (Athena::Timeout::instance(ctx).reached()) { + ATH_MSG_ERROR("Timeout reached before " << name()); + return Athena::Status::TIMEOUT; + } return StatusCode::SUCCESS; } diff --git a/Trigger/TrigSteer/DecisionHandling/src/RoRSeqFilter.cxx b/Trigger/TrigSteer/DecisionHandling/src/RoRSeqFilter.cxx index 7a34923d7d9eb4a7983770eeb65beee2d3acf98c..2cf2efa164c3804998c4ad6448dd1df0406d8ade 100644 --- a/Trigger/TrigSteer/DecisionHandling/src/RoRSeqFilter.cxx +++ b/Trigger/TrigSteer/DecisionHandling/src/RoRSeqFilter.cxx @@ -4,6 +4,8 @@ // DecisionHandling includes #include "RoRSeqFilter.h" +#include "AthenaKernel/Timeout.h" +#include "AthenaKernel/AthStatusCode.h" #include "AthenaMonitoringKernel/Monitored.h" #include "Gaudi/Property.h" @@ -110,6 +112,10 @@ StatusCode RoRSeqFilter::initialize() StatusCode RoRSeqFilter::execute( const EventContext& ctx ) const { ATH_MSG_DEBUG ( "Executing " << name() << "..." ); + if (Athena::Timeout::instance(ctx).reached()) { + ATH_MSG_ERROR("Timeout reached before " << name()); + return Athena::Status::TIMEOUT; + } auto inputHandles = m_inputKeys.makeHandles( ctx ); auto outputHandles = m_outputKeys.makeHandles( ctx );