From c86ecece29028ec346d19aaa70a4625a8a69e0f9 Mon Sep 17 00:00:00 2001 From: Frank Winklmeier <frank.winklmeier@cern.ch> Date: Mon, 4 Nov 2024 15:06:56 +0100 Subject: [PATCH] SystematicsHandles+SelectionHelpers: use extends to auto-declare interface inheritance --- .../Root/SelectionNameSvc.cxx | 12 +--------- .../SelectionHelpers/SelectionNameSvc.h | 22 ++++--------------- .../Root/SystematicsSvc.cxx | 9 -------- .../SystematicsHandles/SystematicsSvc.h | 19 +++------------- 4 files changed, 8 insertions(+), 54 deletions(-) diff --git a/PhysicsAnalysis/Algorithms/SelectionHelpers/Root/SelectionNameSvc.cxx b/PhysicsAnalysis/Algorithms/SelectionHelpers/Root/SelectionNameSvc.cxx index 580a8828e3b..c5410efede8 100644 --- a/PhysicsAnalysis/Algorithms/SelectionHelpers/Root/SelectionNameSvc.cxx +++ b/PhysicsAnalysis/Algorithms/SelectionHelpers/Root/SelectionNameSvc.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration */ /// @author Nils Krumnack @@ -24,16 +24,6 @@ namespace CP { - SelectionNameSvc :: - SelectionNameSvc (const std::string& name, - ISvcLocator* pSvcLocator) - : AsgService (name, pSvcLocator) - { - - declareServiceInterface<ISelectionNameSvc>(); - } - - StatusCode SelectionNameSvc :: initialize () diff --git a/PhysicsAnalysis/Algorithms/SelectionHelpers/SelectionHelpers/SelectionNameSvc.h b/PhysicsAnalysis/Algorithms/SelectionHelpers/SelectionHelpers/SelectionNameSvc.h index 7d6bd2573d0..640066226e1 100644 --- a/PhysicsAnalysis/Algorithms/SelectionHelpers/SelectionHelpers/SelectionNameSvc.h +++ b/PhysicsAnalysis/Algorithms/SelectionHelpers/SelectionHelpers/SelectionNameSvc.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration */ /// @author Nils Krumnack @@ -22,29 +22,15 @@ namespace CP { /// \brief the canonical implementation of \ref ISelectionNameSvc - class SelectionNameSvc final : public asg::AsgService, - virtual public ISelectionNameSvc + class SelectionNameSvc final : public extends<asg::AsgService, ISelectionNameSvc> { - // - // public interface - // - - /// \brief standard constructor - /// \par Guarantee - /// strong - /// \par Failures - /// out of memory II - public: - SelectionNameSvc (const std::string& name, - ISvcLocator* pSvcLocator); - - // - // inherited interface + // public interface // public: + using extends::extends; // base class constructor virtual StatusCode initialize () override; virtual StatusCode addAcceptInfo (const std::string& objectName, const std::string& decorName, diff --git a/PhysicsAnalysis/Algorithms/SystematicsHandles/Root/SystematicsSvc.cxx b/PhysicsAnalysis/Algorithms/SystematicsHandles/Root/SystematicsSvc.cxx index 33fd0150972..8f53be83861 100644 --- a/PhysicsAnalysis/Algorithms/SystematicsHandles/Root/SystematicsSvc.cxx +++ b/PhysicsAnalysis/Algorithms/SystematicsHandles/Root/SystematicsSvc.cxx @@ -25,15 +25,6 @@ namespace CP { - SystematicsSvc :: - SystematicsSvc (const std::string& name, - ISvcLocator* pSvcLocator) - : AsgService (name, pSvcLocator) - { - declareServiceInterface<ISystematicsSvc>(); - } - - StatusCode SystematicsSvc :: initialize () diff --git a/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SystematicsSvc.h b/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SystematicsSvc.h index 5ee3dc7f45d..7674be9934d 100644 --- a/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SystematicsSvc.h +++ b/PhysicsAnalysis/Algorithms/SystematicsHandles/SystematicsHandles/SystematicsSvc.h @@ -20,29 +20,16 @@ namespace CP { /// \brief the canonical implementation of \ref ISystematicsSvc - class SystematicsSvc final : public asg::AsgService, - virtual public ISystematicsSvc + class SystematicsSvc final : public extends<asg::AsgService, ISystematicsSvc> { + // // public interface // - /// \brief standard constructor - /// \par Guarantee - /// strong - /// \par Failures - /// out of memory II public: - SystematicsSvc (const std::string& name, - ISvcLocator* pSvcLocator); - + using extends::extends; // base class constructor - - // - // inherited interface - // - - public: virtual StatusCode initialize () override; virtual StatusCode finalize () override; virtual std::vector<CP::SystematicSet> -- GitLab