From 7f44c57e8fa9a099cbcb0cf5384656af511dd0ac Mon Sep 17 00:00:00 2001 From: Aleksandra Poreba <aleksandra.poreba@cern.ch> Date: Mon, 2 Nov 2020 18:14:33 +0000 Subject: [PATCH] CTPUnpackingTool fixup * add virtual to passBeforePrescale function in tool * return FAILURE while calling passBeforePRescale or decode in tool base --- .../TrigHypoCommonTools/L1InfoHypoTool.h | 4 ++-- Trigger/TrigSteer/L1Decoder/CMakeLists.txt | 3 +-- Trigger/TrigSteer/L1Decoder/L1Decoder/CTPUnpackingTool.h | 2 +- .../TrigSteer/L1Decoder/L1Decoder/CTPUnpackingToolBase.h | 6 +++--- .../L1Decoder/{L1DecoderRoot => src}/CTPUnpackingTool.cxx | 0 .../{L1DecoderRoot => src}/CTPUnpackingToolBase.cxx | 8 +++++++- 6 files changed, 14 insertions(+), 9 deletions(-) rename Trigger/TrigSteer/L1Decoder/{L1DecoderRoot => src}/CTPUnpackingTool.cxx (100%) rename Trigger/TrigSteer/L1Decoder/{L1DecoderRoot => src}/CTPUnpackingToolBase.cxx (71%) diff --git a/Trigger/TrigHypothesis/TrigHypoCommonTools/TrigHypoCommonTools/L1InfoHypoTool.h b/Trigger/TrigHypothesis/TrigHypoCommonTools/TrigHypoCommonTools/L1InfoHypoTool.h index 0a57b49eb7f..0f2a20c5afd 100644 --- a/Trigger/TrigHypothesis/TrigHypoCommonTools/TrigHypoCommonTools/L1InfoHypoTool.h +++ b/Trigger/TrigHypothesis/TrigHypoCommonTools/TrigHypoCommonTools/L1InfoHypoTool.h @@ -8,7 +8,7 @@ #include "Gaudi/Property.h" #include "GaudiKernel/ToolHandle.h" #include "AthenaBaseComps/AthAlgTool.h" -#include "L1Decoder/CTPUnpackingTool.h" +#include "L1Decoder/ICTPUnpackingTool.h" #include "IL1InfoHypoTool.h" @@ -26,7 +26,7 @@ public: private: HLT::Identifier m_decisionId; Gaudi::Property <std::vector<std::string>> m_l1ItemNames {this, "L1ItemNames"}; - ToolHandle <CTPUnpackingTool> m_ctpUnpackingTool {this, "CTPUnpackingTool", "CTPUnpackingTool"}; + ToolHandle <ICTPUnpackingTool> m_ctpUnpackingTool {this, "CTPUnpackingTool", "CTPUnpackingTool"}; }; #endif //TRIGHYPOCOMMONTOOLS_L1INFOHYPOTOOL_H \ No newline at end of file diff --git a/Trigger/TrigSteer/L1Decoder/CMakeLists.txt b/Trigger/TrigSteer/L1Decoder/CMakeLists.txt index 6c516ca73e6..a31a47f5327 100644 --- a/Trigger/TrigSteer/L1Decoder/CMakeLists.txt +++ b/Trigger/TrigSteer/L1Decoder/CMakeLists.txt @@ -9,13 +9,12 @@ find_package( CLHEP ) # Component(s) in the package: atlas_add_library( L1DecoderLib - L1DecoderRoot/*.cxx PUBLIC_HEADERS L1Decoder INTERFACE LINK_LIBRARIES TrigConfInterfaces) atlas_add_component( L1Decoder - src/*.cxx src/components/*.cxx L1DecoderRoot/*.cxx + src/*.cxx src/components/*.cxx INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} LINK_LIBRARIES ${CLHEP_LIBRARIES} AthViews AthenaBaseComps AthenaKernel AthenaMonitoringKernelLib GaudiKernel L1DecoderLib StoreGateLib TrigCompositeUtilsLib TrigConfData TrigConfHLTData TrigConfL1Data TrigCostMonitorMTLib TrigSteeringEvent TrigT1Interfaces TrigT1Result TrigTimeAlgsLib xAODEventInfo xAODTrigger TrigConfxAODLib ) diff --git a/Trigger/TrigSteer/L1Decoder/L1Decoder/CTPUnpackingTool.h b/Trigger/TrigSteer/L1Decoder/L1Decoder/CTPUnpackingTool.h index 53d1f72df5d..d8b306166ab 100644 --- a/Trigger/TrigSteer/L1Decoder/L1Decoder/CTPUnpackingTool.h +++ b/Trigger/TrigSteer/L1Decoder/L1Decoder/CTPUnpackingTool.h @@ -29,7 +29,7 @@ public: virtual StatusCode start() override; - StatusCode passBeforePrescaleSelection(const ROIB::RoIBResult* roib, const std::vector<std::string>& l1ItemNames, bool& pass) const; + virtual StatusCode passBeforePrescaleSelection(const ROIB::RoIBResult* roib, const std::vector<std::string>& l1ItemNames, bool& pass) const; private: // Menu objects (that act here as configuration) need to be available in detector store. diff --git a/Trigger/TrigSteer/L1Decoder/L1Decoder/CTPUnpackingToolBase.h b/Trigger/TrigSteer/L1Decoder/L1Decoder/CTPUnpackingToolBase.h index e524808911c..dff6163befe 100644 --- a/Trigger/TrigSteer/L1Decoder/L1Decoder/CTPUnpackingToolBase.h +++ b/Trigger/TrigSteer/L1Decoder/L1Decoder/CTPUnpackingToolBase.h @@ -29,12 +29,12 @@ public: const IInterface* parent); virtual StatusCode decode(const ROIB::RoIBResult& /*roib*/, - HLT::IDVec& /*enabledChains*/) const override - { return StatusCode::SUCCESS; } + HLT::IDVec& /*enabledChains*/) const override; virtual StatusCode initialize() override; - virtual StatusCode passBeforePrescaleSelection(const ROIB::RoIBResult* roib, const std::vector<std::string>& l1ItemNames, bool& pass) const override; + virtual StatusCode passBeforePrescaleSelection(const ROIB::RoIBResult* /*roib*/, + const std::vector<std::string>& /*l1ItemNames*/, bool& /*pass*/) const override; protected: diff --git a/Trigger/TrigSteer/L1Decoder/L1DecoderRoot/CTPUnpackingTool.cxx b/Trigger/TrigSteer/L1Decoder/src/CTPUnpackingTool.cxx similarity index 100% rename from Trigger/TrigSteer/L1Decoder/L1DecoderRoot/CTPUnpackingTool.cxx rename to Trigger/TrigSteer/L1Decoder/src/CTPUnpackingTool.cxx diff --git a/Trigger/TrigSteer/L1Decoder/L1DecoderRoot/CTPUnpackingToolBase.cxx b/Trigger/TrigSteer/L1Decoder/src/CTPUnpackingToolBase.cxx similarity index 71% rename from Trigger/TrigSteer/L1Decoder/L1DecoderRoot/CTPUnpackingToolBase.cxx rename to Trigger/TrigSteer/L1Decoder/src/CTPUnpackingToolBase.cxx index 2a228fe7bf5..a9976d88c3d 100644 --- a/Trigger/TrigSteer/L1Decoder/L1DecoderRoot/CTPUnpackingToolBase.cxx +++ b/Trigger/TrigSteer/L1Decoder/src/CTPUnpackingToolBase.cxx @@ -25,5 +25,11 @@ StatusCode CTPUnpackingToolBase::initialize() } StatusCode CTPUnpackingToolBase::passBeforePrescaleSelection(const ROIB::RoIBResult* /*roib*/, const std::vector<std::string>& /*l1ItemNames*/, bool& /*pass*/) const { - return StatusCode::SUCCESS; + ATH_MSG_ERROR("Base class should not call this function"); + return StatusCode::FAILURE; +} + +StatusCode CTPUnpackingToolBase::decode(const ROIB::RoIBResult& /*roib*/, HLT::IDVec& /*enabledChains*/) const { + ATH_MSG_ERROR("Base class should not call this function"); + return StatusCode::FAILURE; } -- GitLab