diff --git a/Control/AthToolSupport/AsgServices/AsgServices/AsgService.h b/Control/AthToolSupport/AsgServices/AsgServices/AsgService.h index 66e2a07363acf2c07f590a044d7875e9171abf8d..5c981396cd0feb188d4d6375e1c5ead07b305121 100644 --- a/Control/AthToolSupport/AsgServices/AsgServices/AsgService.h +++ b/Control/AthToolSupport/AsgServices/AsgServices/AsgService.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration */ /// @author Nils Krumnack @@ -38,8 +38,12 @@ namespace asg /// /// Loosely based on the \ref AsgTool implementation. - class AsgService : public virtual IAsgService, - public AsgServiceBase + class AsgService : +#ifndef XAOD_STANDALONE + public extends<AsgServiceBase, IAsgService> +#else + public AsgServiceBase, public virtual IAsgService +#endif { public: AsgService (const std::string& name, @@ -60,11 +64,8 @@ namespace asg #ifndef XAOD_STANDALONE - /// query interface for gaudi - virtual StatusCode queryInterface (const InterfaceID& riid, void **ppvi); - - /// list of interfaces we have private: + /// list of interfaces we have std::vector<std::pair<const InterfaceID& (*)(),void *(*)(AsgService*)>> m_interfaces; #endif diff --git a/Control/AthToolSupport/AsgServices/Root/AsgService.cxx b/Control/AthToolSupport/AsgServices/Root/AsgService.cxx index 7fc83db9cb34a9e34a7e4dc9d4aa6ddbbea6d8b1..e4b1aace01844f9fd92cca020a9494172aeb918f 100644 --- a/Control/AthToolSupport/AsgServices/Root/AsgService.cxx +++ b/Control/AthToolSupport/AsgServices/Root/AsgService.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration */ /// @author Nils Krumnack @@ -18,13 +18,11 @@ namespace asg AsgService :: AsgService( const std::string& name, ISvcLocator* pSvcLocator ) - : AsgServiceBase( #ifndef XAOD_STANDALONE - name, pSvcLocator -#else // not XAOD_STANDALONE - name -#endif // not XAOD_STANDALONE - ) + : base_class(name, pSvcLocator) +#else + : AsgServiceBase(name) +#endif { (void) pSvcLocator; } @@ -51,23 +49,4 @@ namespace asg return; } - - -#ifndef XAOD_STANDALONE - StatusCode AsgService :: - queryInterface (const InterfaceID& riid, void **ppvi) - { - for (const auto& interface : m_interfaces) - { - if (riid == interface.first()) - { - *ppvi = interface.second (this); - addRef(); - return StatusCode::SUCCESS; - } - } - return AsgServiceBase::queryInterface (riid, ppvi); - } -#endif - } // namespace asg