From b57a76b5ae98f4e42b7624fb04b54660e1786482 Mon Sep 17 00:00:00 2001
From: Rafal Bielski <rafal.bielski@cern.ch>
Date: Wed, 12 Sep 2018 14:07:28 +0200
Subject: [PATCH] use extends<> and remove queryInterface in
 TrigEventSelectorByteStream

making use of Gaudi macros to simplify the implementation - queryInterface is handled by the base wrapper class
---
 .../src/TrigEventSelectorByteStream.cxx       | 19 +------------------
 .../src/TrigEventSelectorByteStream.h         |  6 +-----
 2 files changed, 2 insertions(+), 23 deletions(-)

diff --git a/HLT/Event/TrigByteStreamCnvSvc/src/TrigEventSelectorByteStream.cxx b/HLT/Event/TrigByteStreamCnvSvc/src/TrigEventSelectorByteStream.cxx
index e4524d8dc07..07d0c129775 100644
--- a/HLT/Event/TrigByteStreamCnvSvc/src/TrigEventSelectorByteStream.cxx
+++ b/HLT/Event/TrigByteStreamCnvSvc/src/TrigEventSelectorByteStream.cxx
@@ -21,7 +21,7 @@
 // Standard constructor
 // =============================================================================
 TrigEventSelectorByteStream::TrigEventSelectorByteStream(const std::string& name, ISvcLocator* svcLoc)
-: AthService(name, svcLoc),
+: base_class(name, svcLoc),
   m_eventSource("ByteStreamInputSvc", name),
   m_evtStore("StoreGateSvc", name) {
   declareProperty("ByteStreamInputSvc", m_eventSource);
@@ -32,23 +32,6 @@ TrigEventSelectorByteStream::TrigEventSelectorByteStream(const std::string& name
 // =============================================================================
 TrigEventSelectorByteStream::~TrigEventSelectorByteStream() {}
 
-// =============================================================================
-// Implementation of IInterface::queryInterface
-// =============================================================================
-StatusCode TrigEventSelectorByteStream::queryInterface(const InterfaceID& riid, void** ppvInterface)
-{
-  ATH_MSG_VERBOSE("start of " << __FUNCTION__);
-
-  if(IEvtSelector::interfaceID().versionMatch(riid))
-    *ppvInterface = static_cast<IEvtSelector*>(this);
-  else
-    return AthService::queryInterface(riid, ppvInterface);
-
-  addRef();
-  ATH_MSG_VERBOSE("end of " << __FUNCTION__);
-  return StatusCode::SUCCESS;
-}
-
 // =============================================================================
 // Implementation of Service::initialize
 // =============================================================================
diff --git a/HLT/Event/TrigByteStreamCnvSvc/src/TrigEventSelectorByteStream.h b/HLT/Event/TrigByteStreamCnvSvc/src/TrigEventSelectorByteStream.h
index 1d4e951254c..215116729ec 100644
--- a/HLT/Event/TrigByteStreamCnvSvc/src/TrigEventSelectorByteStream.h
+++ b/HLT/Event/TrigByteStreamCnvSvc/src/TrigEventSelectorByteStream.h
@@ -17,8 +17,7 @@ class StoreGateSvc;
  * @brief  online implementation of IEvtSelector for ByteStream
  */
 
-class TrigEventSelectorByteStream : public AthService,
-                                    virtual public IEvtSelector {
+class TrigEventSelectorByteStream : public extends<AthService, IEvtSelector> {
 public:
   /**
    * @class TrigEventSelectorByteStream::Context
@@ -44,9 +43,6 @@ public:
   /// Standard destructor
   virtual ~TrigEventSelectorByteStream();
 
-  // ------------------------- IInterface methods -----------------------------
-  virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override;
-
   // ------------------------- Service methods --------------------------------
   virtual StatusCode initialize() override;
   virtual StatusCode finalize() override;
-- 
GitLab