From 66d6e75b5a9e28889db8aa94727c9a4eed1b593d Mon Sep 17 00:00:00 2001 From: Giovanni Marchiori Date: Tue, 24 Oct 2023 10:16:21 +0200 Subject: [PATCH] check that tools are retrieved successfully --- .../src/components/CreateFCCeeCaloNoiseLevelMap.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/RecFCCeeCalorimeter/src/components/CreateFCCeeCaloNoiseLevelMap.cpp b/RecFCCeeCalorimeter/src/components/CreateFCCeeCaloNoiseLevelMap.cpp index fcbe940d..deaf2261 100644 --- a/RecFCCeeCalorimeter/src/components/CreateFCCeeCaloNoiseLevelMap.cpp +++ b/RecFCCeeCalorimeter/src/components/CreateFCCeeCaloNoiseLevelMap.cpp @@ -32,8 +32,15 @@ StatusCode CreateFCCeeCaloNoiseLevelMap::initialize() { return StatusCode::FAILURE; } - //m_ecalBarrelNoiseTool.retrieve(); - //m_hcalBarrelNoiseTool.retrieve(); + if (!m_ecalBarrelNoiseTool.retrieve()) { + error() << "Unable to retrieve the ECAL noise tool!!!" << endmsg; + return StatusCode::FAILURE; + } + + if (!m_hcalBarrelNoiseTool.retrieve()) { + error() << "Unable to retrieve the HCAL noise tool!!!" << endmsg; + return StatusCode::FAILURE; + } std::unordered_map> map;