From cf09f66ed75b716e6a1e191de918dde167281885 Mon Sep 17 00:00:00 2001 From: Frank Winklmeier <fwinkl@cern> Date: Thu, 25 Mar 2021 09:43:04 +0100 Subject: [PATCH] TrigT1ResultByteStream: put MuCTPISrcIdMap on stack and delete L1SrcIdMap No need to dynamically allocated `MuCTPISrcIdMap`. Also delete unused `L1SrcIdMap`. --- .../TrigT1ResultByteStream/CTPByteStreamCnv.h | 19 +++----- .../CTPByteStreamTool.h | 12 +---- .../TrigT1ResultByteStream/CTPSrcIdMap.h | 14 +++--- .../TrigT1ResultByteStream/L1SrcIdMap.h | 46 ------------------- .../MuCTPIByteStreamCnv.h | 19 +++----- .../MuCTPIByteStreamTool.h | 13 +----- .../TrigT1ResultByteStream/MuCTPISrcIdMap.h | 14 +++--- .../RecCTPByteStreamCnv.h | 16 +++---- .../RecCTPByteStreamTool.h | 12 +---- .../RecMuCTPIByteStreamCnv.h | 17 +++---- .../RecMuCTPIByteStreamTool.h | 8 ++-- .../RoIBResultByteStreamTool.h | 6 +-- .../src/CTPByteStreamCnv.cxx | 25 ++-------- .../src/CTPByteStreamTool.cxx | 32 ++----------- .../src/CTPSrcIdMap.cxx | 14 ++---- .../TrigT1ResultByteStream/src/L1SrcIdMap.cxx | 35 -------------- .../src/MuCTPIByteStreamCnv.cxx | 24 ++-------- .../src/MuCTPIByteStreamTool.cxx | 36 ++------------- .../src/MuCTPISrcIdMap.cxx | 14 ++---- .../src/RecCTPByteStreamCnv.cxx | 25 ++-------- .../src/RecCTPByteStreamTool.cxx | 30 ++---------- .../src/RecMuCTPIByteStreamCnv.cxx | 28 ++--------- .../src/RecMuCTPIByteStreamTool.cxx | 13 +----- 23 files changed, 86 insertions(+), 386 deletions(-) delete mode 100755 Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/L1SrcIdMap.h delete mode 100755 Trigger/TrigT1/TrigT1ResultByteStream/src/L1SrcIdMap.cxx diff --git a/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/CTPByteStreamCnv.h b/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/CTPByteStreamCnv.h index 64ebff9fe10e..c5b6cf2589a4 100644 --- a/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/CTPByteStreamCnv.h +++ b/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/CTPByteStreamCnv.h @@ -1,7 +1,7 @@ // Dear emacs, this is -*- c++ -*- /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #ifndef TRIGT1RESULTBYTESTREAM_CTPBYTESTREAMCNV_H @@ -17,9 +17,8 @@ // Local include(s): #include "TrigT1ResultByteStream/CTPByteStreamTool.h" +#include "TrigT1ResultByteStream/CTPSrcIdMap.h" -// Forward declaration(s): -class CTPSrcIdMap; /** * @short ByteStream converter for the CTP_RDO object @@ -32,7 +31,6 @@ class CTPSrcIdMap; * @see CTPByteStreamTool * * @author David Berge - * @date $Date: 2009-02-23 21:23:03 $ */ class CTPByteStreamCnv : public Converter { @@ -40,18 +38,15 @@ public: /// Standard constructor CTPByteStreamCnv( ISvcLocator* svcloc ); - /// Standard destructor - ~CTPByteStreamCnv(); - /// Function connecting to all the needed services/tools - virtual StatusCode initialize(); + virtual StatusCode initialize() override; /// Function creating the CTP_RDO object from a CTP ROB fragment - virtual StatusCode createObj( IOpaqueAddress* pAddr, DataObject*& pObj ); + virtual StatusCode createObj( IOpaqueAddress* pAddr, DataObject*& pObj ) override; /// Function creating the CTP ROB fragment from a CTP_RDO object - virtual StatusCode createRep( DataObject* pObj, IOpaqueAddress*& pAddr ); + virtual StatusCode createRep( DataObject* pObj, IOpaqueAddress*& pAddr ) override; /// Function needed by the framework - virtual long repSvcType() const { return i_repSvcType(); } + virtual long repSvcType() const override { return i_repSvcType(); } /// Function needed by the framework static long storageType(); /// Function needed by the framework @@ -62,7 +57,7 @@ private: ToolHandle< CTPByteStreamTool > m_tool; /// Object storing the various IDs of the CTP fragment - CTPSrcIdMap* m_srcIdMap; + CTPSrcIdMap m_srcIdMap; /// Service used when reading the BS data ServiceHandle< IROBDataProviderSvc > m_robDataProvider; diff --git a/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/CTPByteStreamTool.h b/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/CTPByteStreamTool.h index 6d7358bdd1f2..3d2f221d0d41 100755 --- a/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/CTPByteStreamTool.h +++ b/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/CTPByteStreamTool.h @@ -1,7 +1,7 @@ // Dear emacs, this is -*- c++ -*- /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #ifndef TRIGT1RESULTBYTESTREAM_CTPBYTESTREAMTOOL_H @@ -18,7 +18,6 @@ // Forward declaration(s): class CTP_RDO; -class MsgStream; /** * @short Tool doing the CTP_RDO <-> ByteStream conversion @@ -40,17 +39,10 @@ public: /// Default constructor CTPByteStreamTool( const std::string& type, const std::string& name, const IInterface* parent ); - /// Default destructor - virtual ~CTPByteStreamTool(); /// AlgTool InterfaceID static const InterfaceID& interfaceID(); - /// Function to initialise the tool - virtual StatusCode initialize(); - /// Function to finalise the tool - virtual StatusCode finalize(); - /// Convert ROBFragment to CTP_RDO StatusCode convert( const ROBF* rob, CTP_RDO*& result ); /// convert CTP_RDO to ByteStream @@ -58,7 +50,7 @@ public: private: /// Object storing the various IDs of the CTP fragment - CTPSrcIdMap* m_srcIdMap; + CTPSrcIdMap m_srcIdMap; /// Object used in creating the CTP ROB fragment FullEventAssembler< CTPSrcIdMap > m_fea; diff --git a/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/CTPSrcIdMap.h b/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/CTPSrcIdMap.h index 548e9f611c09..fafc5a98e983 100755 --- a/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/CTPSrcIdMap.h +++ b/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/CTPSrcIdMap.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #ifndef TRIGT1RESULTBYTESTREAM_CTPSRCIDMAP_H @@ -11,30 +11,30 @@ higher level source ID for CTP ByteStream fragments. This is to be used in assembling the fragments from ROD fragments - * @author Tadashi Maeno + @author Tadashi Maeno */ class CTPSrcIdMap { public: /** constrcutor */ - CTPSrcIdMap(); + CTPSrcIdMap() = default; /** get a ROD Source ID */ - uint32_t getRodID (); + uint32_t getRodID () const; /** Make a ROB Source ID from a ROD source ID */ - uint32_t getRobID (uint32_t rod_id); + uint32_t getRobID (uint32_t rod_id) const; /** Make a ROS Source ID from a ROB source ID */ - uint32_t getRosID (uint32_t rob_id); + uint32_t getRosID (uint32_t rob_id) const; /** Make a SubDetector ID from ROS source ID */ - uint32_t getDetID (uint32_t ros_id); + uint32_t getDetID (uint32_t ros_id) const; }; diff --git a/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/L1SrcIdMap.h b/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/L1SrcIdMap.h deleted file mode 100755 index 359eba7cb25d..000000000000 --- a/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/L1SrcIdMap.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef TRIGT1RESULTBYTESTREAM_L1SRCIDMAP_H -#define TRIGT1RESULTBYTESTREAM_L1SRCIDMAP_H - -#include <stdint.h> - -/** this class provides conversion between Lower level Source ID to - higher level source ID for L1 ByteStream fragments. - - This is to be used in assembling the fragments from ROD fragments - Hong Ma Oct 18, 2002 - -*/ -class L1SrcIdMap { - -public: - - /** The RoIB source ID: - reserved / RoIB module type / subdet ID / module ID - This already follows the new version 2.2 of ATLAS-DAQ-98-129. - */ - - /** constrcutor - */ - L1SrcIdMap(); - - uint32_t getRodID(); - - /** Make a ROB Source ID from a ROD source ID - */ - uint32_t getRobID( uint32_t rod_id ); - - /** Make a ROS Source ID from a ROB source ID - */ - uint32_t getRosID( uint32_t rob_id ); - - /** Make a SubDetector ID from ROS source ID - */ - uint32_t getDetID( uint32_t ros_id ); - -}; - -#endif // TRIGT1RESULTBYTESTREAM_L1SRCIDMAP_H diff --git a/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/MuCTPIByteStreamCnv.h b/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/MuCTPIByteStreamCnv.h index c0fce9b25699..1dc1933930de 100644 --- a/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/MuCTPIByteStreamCnv.h +++ b/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/MuCTPIByteStreamCnv.h @@ -1,7 +1,7 @@ // Dear emacs, this is -*- c++ -*- /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #ifndef TRIGT1RESULTBYTESTREAM_MUCTPIBYTESTREAMCNV_H @@ -23,13 +23,12 @@ // Local include(s): #include "TrigT1ResultByteStream/MuCTPIByteStreamTool.h" +#include "TrigT1ResultByteStream/MuCTPISrcIdMap.h" #ifdef CTP_MUCTPI_HAVE_SAME_ROS # include "TrigT1ResultByteStream/CTPByteStreamTool.h" # include "TrigT1ResultByteStream/RecCTPByteStreamTool.h" #endif -// Forward declaration(s): -class MuCTPISrcIdMap; /** * @short ByteStream converter for the MuCTPI_RDO object @@ -44,7 +43,6 @@ class MuCTPISrcIdMap; * * @author Tadashi Maeno * @author Attila Krasznahorkay - * @date $Date: 2009-02-23 21:23:03 $ */ class MuCTPIByteStreamCnv : public Converter { @@ -52,18 +50,15 @@ public: /// Standard constructor MuCTPIByteStreamCnv( ISvcLocator* svcloc ); - /// Standard destructor - ~MuCTPIByteStreamCnv(); - /// Function connecting to all the needed services/tools - virtual StatusCode initialize(); + virtual StatusCode initialize() override; /// Function creating the MuCTPI_RDO object from a MuCTPI ROB fragment - virtual StatusCode createObj( IOpaqueAddress* pAddr, DataObject*& pObj ); + virtual StatusCode createObj( IOpaqueAddress* pAddr, DataObject*& pObj ) override; /// Function creating the MuCTPI ROB fragment from a MuCTPI_RDO object - virtual StatusCode createRep( DataObject* pObj, IOpaqueAddress*& pAddr ); + virtual StatusCode createRep( DataObject* pObj, IOpaqueAddress*& pAddr ) override; /// Function needed by the framework - virtual long repSvcType() const { return i_repSvcType(); } + virtual long repSvcType() const override { return i_repSvcType(); } /// Function needed by the framework static long storageType(); /// Function needed by the framework @@ -73,7 +68,7 @@ private: /// Tool doing the actual conversion ToolHandle< MuCTPIByteStreamTool > m_tool; /// Object storing the various IDs of the MuCTPI fragment - MuCTPISrcIdMap* m_srcIdMap; + MuCTPISrcIdMap m_srcIdMap; #ifdef CTP_MUCTPI_HAVE_SAME_ROS ToolHandle< CTPByteStreamTool > m_ctp_tool; diff --git a/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/MuCTPIByteStreamTool.h b/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/MuCTPIByteStreamTool.h index d0ce85349836..311fc95613fe 100755 --- a/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/MuCTPIByteStreamTool.h +++ b/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/MuCTPIByteStreamTool.h @@ -1,7 +1,7 @@ // Dear emacs, this is -*- c++ -*- /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #ifndef TRIGT1RESULTBYTESTREAM_MUCTPIBYTESTREAMTOOL_H @@ -16,7 +16,6 @@ #include "TrigT1ResultByteStream/MuCTPISrcIdMap.h" // Forward declaration(s): -class MsgStream; class MuCTPI_RDO; /** @@ -29,7 +28,6 @@ class MuCTPI_RDO; * * @author Tadashi Maeno * @author Attila Krasznahorkay - * @date $Date: 2007-12-14 15:33:08 $ */ class MuCTPIByteStreamTool : public AthAlgTool { @@ -40,17 +38,10 @@ public: /// Default constructor MuCTPIByteStreamTool( const std::string& type, const std::string& name, const IInterface* parent ); - /// Default destructor - virtual ~MuCTPIByteStreamTool(); /// AlgTool InterfaceID static const InterfaceID& interfaceID(); - /// Function to initialise the tool - virtual StatusCode initialize(); - /// Function to finalise the tool - virtual StatusCode finalize(); - /// Convert ROBFragment to MuCTPI_RDO StatusCode convert( const ROBF* rob, MuCTPI_RDO*& result ); /// convert MuCTPI_RDO to ByteStream @@ -58,7 +49,7 @@ public: private: /// Object storing the various IDs of the MuCTPI fragment - MuCTPISrcIdMap* m_srcIdMap; + MuCTPISrcIdMap m_srcIdMap; /// Object used in creating the MuCTPI ROB fragment FullEventAssembler< MuCTPISrcIdMap > m_fea; diff --git a/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/MuCTPISrcIdMap.h b/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/MuCTPISrcIdMap.h index 66c757cffa8c..8d1be54e721b 100755 --- a/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/MuCTPISrcIdMap.h +++ b/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/MuCTPISrcIdMap.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #ifndef TRIGT1RESULTBYTESTREAM_MUCTPISRCIDMAP_H @@ -11,30 +11,30 @@ higher level source ID for MuCTPI ByteStream fragments. This is to be used in assembling the fragments from ROD fragments - * @author Tadashi Maeno + @author Tadashi Maeno */ class MuCTPISrcIdMap { public: /** constrcutor */ - MuCTPISrcIdMap(); + MuCTPISrcIdMap() = default; /** get a ROD Source ID */ - uint32_t getRodID (); + uint32_t getRodID () const; /** Make a ROB Source ID from a ROD source ID */ - uint32_t getRobID (uint32_t rod_id); + uint32_t getRobID (uint32_t rod_id) const; /** Make a ROS Source ID from a ROB source ID */ - uint32_t getRosID (uint32_t rob_id); + uint32_t getRosID (uint32_t rob_id) const; /** Make a SubDetector ID from ROS source ID */ - uint32_t getDetID (uint32_t ros_id); + uint32_t getDetID (uint32_t ros_id) const; }; diff --git a/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/RecCTPByteStreamCnv.h b/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/RecCTPByteStreamCnv.h index 08482adb2a75..436698f78ef4 100644 --- a/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/RecCTPByteStreamCnv.h +++ b/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/RecCTPByteStreamCnv.h @@ -1,7 +1,7 @@ // Dear emacs, this is -*- c++ -*- /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #ifndef TRIGT1RESULTBYTESTREAM_RECCTPBYTESTREAMCNV_H @@ -17,9 +17,8 @@ // Local include(s): #include "TrigT1ResultByteStream/RecCTPByteStreamTool.h" +#include "TrigT1ResultByteStream/CTPSrcIdMap.h" -// Forward declaration(s): -class CTPSrcIdMap; /** * @short ByteStream converter for the CTP_RIO object @@ -40,16 +39,13 @@ public: /// Standard constructor RecCTPByteStreamCnv(ISvcLocator* svcloc); - /// Standard destructor - ~RecCTPByteStreamCnv(); - /// Function connecting to all the needed services/tools - virtual StatusCode initialize(); + virtual StatusCode initialize() override; /// Function creating the CTP_RIO object from a CTP ROB fragment - virtual StatusCode createObj( IOpaqueAddress* pAddr, DataObject*& pObj ); + virtual StatusCode createObj( IOpaqueAddress* pAddr, DataObject*& pObj ) override; /// Function needed by the framework - virtual long repSvcType() const { return i_repSvcType(); } + virtual long repSvcType() const override { return i_repSvcType(); } /// Function needed by the framework static long storageType(); /// Function needed by the framework @@ -60,7 +56,7 @@ private: ToolHandle< RecCTPByteStreamTool > m_tool; /// Object storing the various IDs of the CTP fragment - CTPSrcIdMap* m_srcIdMap; + CTPSrcIdMap m_srcIdMap; /// Service used when reading the BS data ServiceHandle< IROBDataProviderSvc > m_robDataProvider; diff --git a/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/RecCTPByteStreamTool.h b/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/RecCTPByteStreamTool.h index bf489c062ae9..08a66425a344 100755 --- a/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/RecCTPByteStreamTool.h +++ b/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/RecCTPByteStreamTool.h @@ -1,7 +1,7 @@ // Dear emacs, this is -*- c++ -*- /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #ifndef TRIGT1RESULTBYTESTREAM_RECCTPBYTESTREAMTOOL_H @@ -28,7 +28,6 @@ class CTP_RIO; * @see RecCTPByteStreamCnv * * @author David Berge - * @date $Date: 2007-12-14 15:33:09 $ */ class RecCTPByteStreamTool : public AthAlgTool { @@ -39,23 +38,16 @@ public: /// Default constructor RecCTPByteStreamTool( const std::string& type, const std::string& name, const IInterface* parent ); - /// Default destructor - virtual ~RecCTPByteStreamTool(); /// AlgTool InterfaceID static const InterfaceID& interfaceID(); - /// Function to initialise the tool - virtual StatusCode initialize(); - /// Function to finalise the tool - virtual StatusCode finalize(); - /// Convert ROBFragment to CTP_RIO StatusCode convert( const ROBF* rob, CTP_RIO*& result ); private: /// Object storing the various IDs of the CTP fragment - CTPSrcIdMap* m_srcIdMap; + CTPSrcIdMap m_srcIdMap; }; // class RecCTPByteStreamTool diff --git a/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/RecMuCTPIByteStreamCnv.h b/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/RecMuCTPIByteStreamCnv.h index ff17922350b3..f9536e6a3847 100644 --- a/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/RecMuCTPIByteStreamCnv.h +++ b/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/RecMuCTPIByteStreamCnv.h @@ -1,7 +1,7 @@ // Dear emacs, this is -*- c++ -*- /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #ifndef TRIGT1RESULTBYTESTREAM_RECMUCTPIBYTESTREAMCNV_H @@ -17,9 +17,8 @@ // Local include(s): #include "TrigT1ResultByteStream/RecMuCTPIByteStreamTool.h" +#include "TrigT1ResultByteStream/MuCTPISrcIdMap.h" -// Forward declaration(s): -class MuCTPISrcIdMap; /** * @short ByteStream converter for the MuCTPI_RIO object @@ -34,7 +33,6 @@ class MuCTPISrcIdMap; * * @author Tadashi Maeno * @author Attila Krasznahorkay - * @date $Date: 2009-02-23 21:23:03 $ */ class RecMuCTPIByteStreamCnv : public Converter { @@ -42,16 +40,13 @@ public: /// Standard constructor RecMuCTPIByteStreamCnv( ISvcLocator* svcloc ); - /// Standard destructor - ~RecMuCTPIByteStreamCnv(); - /// Function connecting to all the needed services/tools - virtual StatusCode initialize(); + virtual StatusCode initialize() override; /// Function creating the MuCTPI_RIO object from a MuCTPI ROB fragment - virtual StatusCode createObj( IOpaqueAddress* pAddr, DataObject*& pObj ); + virtual StatusCode createObj( IOpaqueAddress* pAddr, DataObject*& pObj ) override; /// Function needed by the framework - virtual long repSvcType() const { return i_repSvcType(); } + virtual long repSvcType() const override { return i_repSvcType(); } /// Function needed by the framework static long storageType(); /// Function needed by the framework @@ -62,7 +57,7 @@ private: ToolHandle< RecMuCTPIByteStreamTool > m_tool; /// Object storing the various IDs of the MuCTPI fragment - MuCTPISrcIdMap* m_srcIdMap; + MuCTPISrcIdMap m_srcIdMap; /// Service used when reading the BS data ServiceHandle< IROBDataProviderSvc > m_robDataProvider; diff --git a/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/RecMuCTPIByteStreamTool.h b/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/RecMuCTPIByteStreamTool.h index 4368e79ab93a..36c6d797d5c9 100755 --- a/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/RecMuCTPIByteStreamTool.h +++ b/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/RecMuCTPIByteStreamTool.h @@ -15,9 +15,11 @@ #include "TrigT1Interfaces/ITrigT1MuonRecRoiTool.h" #include "TrigConfInterfaces/ILVL1ConfigSvc.h" +// Local include(s): +#include "TrigT1ResultByteStream/MuCTPISrcIdMap.h" + // Forward declaration(s): class MuCTPI_RIO; -class MuCTPISrcIdMap; /** * @short Tool doing the ByteStream -> MuCTPI_RIO conversion @@ -47,15 +49,13 @@ public: /// Function to initialise the tool virtual StatusCode initialize() override; - /// Function to finalise the tool - virtual StatusCode finalize() override; /// Convert ROBFragment to MuCTPI_RIO StatusCode convert( const ROBF* rob, MuCTPI_RIO*& cont ); private: /// Object storing the various IDs of the MuCTPI fragment - MuCTPISrcIdMap* m_srcIdMap{nullptr}; + MuCTPISrcIdMap m_srcIdMap; ToolHandle<LVL1::ITrigT1MuonRecRoiTool> m_rpcRoITool { this, "RPCRecRoiSvc", "LVL1::TrigT1RPCRecRoiTool/TrigT1RPCRecRoiTool", "RPC RoI reconstruction tool" diff --git a/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/RoIBResultByteStreamTool.h b/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/RoIBResultByteStreamTool.h index a77418d359ad..0595ddf6202f 100755 --- a/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/RoIBResultByteStreamTool.h +++ b/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/RoIBResultByteStreamTool.h @@ -1,13 +1,10 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #ifndef TRIGT1RESULTBYTESTREAM_ROIBRESULTBYTESTREAMTOOL_H #define TRIGT1RESULTBYTESTREAM_ROIBRESULTBYTESTREAMTOOL_H -// Local includes -#include "L1SrcIdMap.h" - // Trigger includes #include "L1TopoRDO/L1TopoRDO.h" #include "TrigT1Result/Header.h" @@ -37,7 +34,6 @@ namespace ROIB { * * @author Tadashi Maeno * @author Attila Krasznahorkay - * @date $Date: 2008-03-28 17:25:52 $ */ class RoIBResultByteStreamTool : public extends<AthAlgTool, IL1TriggerByteStreamTool> { diff --git a/Trigger/TrigT1/TrigT1ResultByteStream/src/CTPByteStreamCnv.cxx b/Trigger/TrigT1/TrigT1ResultByteStream/src/CTPByteStreamCnv.cxx index 95bd07f839e6..5741d57ef071 100755 --- a/Trigger/TrigT1/TrigT1ResultByteStream/src/CTPByteStreamCnv.cxx +++ b/Trigger/TrigT1/TrigT1ResultByteStream/src/CTPByteStreamCnv.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ @@ -16,7 +16,6 @@ // Local include(s): #include "TrigT1ResultByteStream/CTPByteStreamCnv.h" -#include "TrigT1ResultByteStream/CTPSrcIdMap.h" /** * The constructor sets up all the ToolHandle and ServiceHandle objects and initialises the @@ -24,25 +23,12 @@ */ CTPByteStreamCnv::CTPByteStreamCnv( ISvcLocator* svcloc ) : Converter( storageType(), classID(), svcloc ), - m_tool( "CTPByteStreamTool" ), m_srcIdMap( 0 ), + m_tool( "CTPByteStreamTool" ), m_robDataProvider( "ROBDataProviderSvc", "CTPByteStreamCnv" ), m_ByteStreamEventAccess( "ByteStreamCnvSvc", "CTPByteStreamCnv" ) { } -/** - * The destructor actually does some cleanup, it deletes the CTPSrcIdMap - * object that is created in the initialize() function. - */ -CTPByteStreamCnv::~CTPByteStreamCnv() { - - if( m_srcIdMap ) { - delete m_srcIdMap; - m_srcIdMap = 0; - } - -} - /** * Function telling the framework the Class ID of the object that this converter * is for (CTP_RDO). @@ -92,11 +78,6 @@ StatusCode CTPByteStreamCnv::initialize() { log << MSG::DEBUG << "Connected to ROBDataProviderSvc" << endmsg; } - // - // Create CTPSrcIdMap: - // - m_srcIdMap = new CTPSrcIdMap(); - return StatusCode::SUCCESS; } @@ -122,7 +103,7 @@ StatusCode CTPByteStreamCnv::createObj( IOpaqueAddress* pAddr, DataObject*& pObj // // Get the SourceID: // - const uint32_t robId = m_srcIdMap->getRobID( m_srcIdMap->getRodID() ); + const uint32_t robId = m_srcIdMap.getRobID( m_srcIdMap.getRodID() ); log << MSG::DEBUG << "expected ROB sub-detector ID: " << std::hex << robId << std::dec << endmsg; diff --git a/Trigger/TrigT1/TrigT1ResultByteStream/src/CTPByteStreamTool.cxx b/Trigger/TrigT1/TrigT1ResultByteStream/src/CTPByteStreamTool.cxx index a2bc4be74ab5..067ce650adc8 100755 --- a/Trigger/TrigT1/TrigT1ResultByteStream/src/CTPByteStreamTool.cxx +++ b/Trigger/TrigT1/TrigT1ResultByteStream/src/CTPByteStreamTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ // CTP data format include(s): @@ -30,35 +30,11 @@ const InterfaceID& CTPByteStreamTool::interfaceID() { */ CTPByteStreamTool::CTPByteStreamTool( const std::string& type, const std::string& name, const IInterface* parent ) - : AthAlgTool( type, name, parent ), m_srcIdMap( 0 ) { + : AthAlgTool( type, name, parent ) { declareInterface< CTPByteStreamTool >( this ); } -/** - * The destructor doesn't do anything. - */ -CTPByteStreamTool::~CTPByteStreamTool() { - -} - -/** - * The function creates a CTPSrcIdMap object that is used in the conversion - * and initialises the base class. - */ -StatusCode CTPByteStreamTool::initialize() { - m_srcIdMap = new CTPSrcIdMap(); - return StatusCode::SUCCESS; -} - -/** - * The function deletes the CTPSrcIdMap object and finalises the base class. - */ -StatusCode CTPByteStreamTool::finalize() { - delete m_srcIdMap; - return StatusCode::SUCCESS; -} - /** * Conversion from RDO to eformat::ROBFragment. @@ -87,7 +63,7 @@ StatusCode CTPByteStreamTool::convert( const CTP_RDO* result, RawEventWrite* re FullEventAssembler< CTPSrcIdMap >::RODDATA* theROD; // Source ID of CTP - const uint32_t rodId = m_srcIdMap->getRodID(); + const uint32_t rodId = m_srcIdMap.getRodID(); ATH_MSG_DEBUG(" ROD ID:" << MSG::hex << rodId); @@ -122,7 +98,7 @@ StatusCode CTPByteStreamTool::convert( const ROBF* rob, CTP_RDO*& result ) { MsgStream log( msgSvc(), name() ); ATH_MSG_DEBUG("executing convert() from ROBFragment to RDO"); - const uint32_t ctpRodId = m_srcIdMap->getRodID(); + const uint32_t ctpRodId = m_srcIdMap.getRodID(); const uint32_t rodId = rob->rod_source_id(); ATH_MSG_DEBUG(" expected ROD sub-detector ID: " << std::hex << ctpRodId diff --git a/Trigger/TrigT1/TrigT1ResultByteStream/src/CTPSrcIdMap.cxx b/Trigger/TrigT1/TrigT1ResultByteStream/src/CTPSrcIdMap.cxx index beac4995592d..831e9171bbfa 100755 --- a/Trigger/TrigT1/TrigT1ResultByteStream/src/CTPSrcIdMap.cxx +++ b/Trigger/TrigT1/TrigT1ResultByteStream/src/CTPSrcIdMap.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ @@ -10,27 +10,23 @@ using eformat::helper::SourceIdentifier; -CTPSrcIdMap::CTPSrcIdMap() { - -} - -uint32_t CTPSrcIdMap::getRodID() { +uint32_t CTPSrcIdMap::getRodID() const { SourceIdentifier helpID( eformat::TDAQ_CTP, 0 ); return helpID.code(); } -uint32_t CTPSrcIdMap::getRobID( uint32_t /*rod_id*/ ) { +uint32_t CTPSrcIdMap::getRobID( uint32_t /*rod_id*/ ) const { SourceIdentifier helpID( eformat::TDAQ_CTP, 0 ); return helpID.code(); } -uint32_t CTPSrcIdMap::getRosID( uint32_t rob_id ) { +uint32_t CTPSrcIdMap::getRosID( uint32_t rob_id ) const { SourceIdentifier id = SourceIdentifier( rob_id ); SourceIdentifier id2 = SourceIdentifier( id.subdetector_id(), 0 ); return id2.code(); } -uint32_t CTPSrcIdMap::getDetID( uint32_t ros_id ) { +uint32_t CTPSrcIdMap::getDetID( uint32_t ros_id ) const { SourceIdentifier id = SourceIdentifier( ros_id ); SourceIdentifier id2 = SourceIdentifier( id.subdetector_id(), 0 ); return id2.code(); diff --git a/Trigger/TrigT1/TrigT1ResultByteStream/src/L1SrcIdMap.cxx b/Trigger/TrigT1/TrigT1ResultByteStream/src/L1SrcIdMap.cxx deleted file mode 100755 index e921881c2905..000000000000 --- a/Trigger/TrigT1/TrigT1ResultByteStream/src/L1SrcIdMap.cxx +++ /dev/null @@ -1,35 +0,0 @@ -/* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration -*/ - - -#include "eformat/SourceIdentifier.h" - -#include "TrigT1ResultByteStream/L1SrcIdMap.h" - -using eformat::helper::SourceIdentifier; - - -L1SrcIdMap::L1SrcIdMap() { - -} - -uint32_t L1SrcIdMap::getRodID() { - SourceIdentifier helperID( eformat::TDAQ_LVL2, 0 ); - return helperID.code(); -} - -uint32_t L1SrcIdMap::getRobID( uint32_t rod_id ) { - return rod_id; -} - -uint32_t L1SrcIdMap::getRosID( uint32_t ) { - SourceIdentifier helperID2( eformat::TDAQ_LVL2, 0 ); - return helperID2.code(); -} - -uint32_t L1SrcIdMap::getDetID ( uint32_t ros_id) { - SourceIdentifier helperID1( ros_id ); - SourceIdentifier helperID2( helperID1.subdetector_id(), 0 ); - return helperID2.code(); -} diff --git a/Trigger/TrigT1/TrigT1ResultByteStream/src/MuCTPIByteStreamCnv.cxx b/Trigger/TrigT1/TrigT1ResultByteStream/src/MuCTPIByteStreamCnv.cxx index cb0d403afa97..0438a9478e6e 100755 --- a/Trigger/TrigT1/TrigT1ResultByteStream/src/MuCTPIByteStreamCnv.cxx +++ b/Trigger/TrigT1/TrigT1ResultByteStream/src/MuCTPIByteStreamCnv.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ @@ -32,7 +32,7 @@ */ MuCTPIByteStreamCnv::MuCTPIByteStreamCnv( ISvcLocator* svcloc ) : Converter( storageType(), classID(), svcloc ), - m_tool( "MuCTPIByteStreamTool" ), m_srcIdMap( 0 ), + m_tool( "MuCTPIByteStreamTool" ), #ifdef CTP_MUCTPI_HAVE_SAME_ROS m_ctp_tool( "CTPByteStreamTool" ), m_ctp_rec_tool( "RecCTPByteStreamTool" ), @@ -43,19 +43,6 @@ MuCTPIByteStreamCnv::MuCTPIByteStreamCnv( ISvcLocator* svcloc ) } -/** - * The destructor actually does some cleanup, it deletes the CTPSrcIdMap - * object that is created in the initialize() function. - */ -MuCTPIByteStreamCnv::~MuCTPIByteStreamCnv() { - - if( m_srcIdMap ) { - delete m_srcIdMap; - m_srcIdMap = 0; - } - -} - /** * Function telling the framework the Class ID of the object that this converter * is for (MuCTPI_RDO). @@ -118,11 +105,6 @@ StatusCode MuCTPIByteStreamCnv::initialize() { log << MSG::DEBUG << "Connected to ROBDataProviderSvc" << endmsg; } - // - // Create MuCTPISrcIdMap: - // - m_srcIdMap = new MuCTPISrcIdMap(); - return StatusCode::SUCCESS; } @@ -148,7 +130,7 @@ StatusCode MuCTPIByteStreamCnv::createObj( IOpaqueAddress* pAddr, DataObject*& p // // Get SourceID: // - const uint32_t robId = m_srcIdMap->getRobID( m_srcIdMap->getRodID() ); + const uint32_t robId = m_srcIdMap.getRobID( m_srcIdMap.getRodID() ); log << MSG::DEBUG << " expected ROB sub-detector ID: " << std::hex << robId << std::dec << endmsg; diff --git a/Trigger/TrigT1/TrigT1ResultByteStream/src/MuCTPIByteStreamTool.cxx b/Trigger/TrigT1/TrigT1ResultByteStream/src/MuCTPIByteStreamTool.cxx index a0fa201d743a..67e18ae5bb9f 100755 --- a/Trigger/TrigT1/TrigT1ResultByteStream/src/MuCTPIByteStreamTool.cxx +++ b/Trigger/TrigT1/TrigT1ResultByteStream/src/MuCTPIByteStreamTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #include "TrigT1ResultByteStream/MuCTPIByteStreamTool.h" @@ -23,39 +23,11 @@ const InterfaceID & MuCTPIByteStreamTool::interfaceID() { */ MuCTPIByteStreamTool::MuCTPIByteStreamTool( const std::string& type, const std::string& name, const IInterface* parent ) - : AthAlgTool( type, name, parent ), m_srcIdMap( 0 ) { + : AthAlgTool( type, name, parent ) { declareInterface<MuCTPIByteStreamTool>( this ); } -/** - * The destructor doesn't do anything. - */ -MuCTPIByteStreamTool::~MuCTPIByteStreamTool() { - -} - -/** - * The function creates a MuCTPISrcIdMap object that is used in the conversion - * and initialises the base class. - */ -StatusCode MuCTPIByteStreamTool::initialize() { - - m_srcIdMap = new MuCTPISrcIdMap(); - return AlgTool::initialize(); - -} - -/** - * The function deletes the MuCTPISrcIdMap object and finalises the base class. - */ -StatusCode MuCTPIByteStreamTool::finalize() { - - delete m_srcIdMap; - return AlgTool::finalize(); - -} - /** * Conversion from RDO to eformat::ROBFragment. * This is called from the MuCTPIByteStreamCnv::createRep method. @@ -71,7 +43,7 @@ StatusCode MuCTPIByteStreamTool::convert( const MuCTPI_RDO* result, RawEventWrit FullEventAssembler< MuCTPISrcIdMap >::RODDATA* theROD; // Source ID of MIROD - const uint32_t rodId = m_srcIdMap->getRodID(); + const uint32_t rodId = m_srcIdMap.getRodID(); // get the ROD data container to be filled theROD = m_fea.getRodData( rodId ); @@ -114,7 +86,7 @@ StatusCode MuCTPIByteStreamTool::convert( const ROBF* rob, MuCTPI_RDO*& result ) ATH_MSG_DEBUG("executing convert() from ROBFragment to RDO"); // Source ID of MIROD - const uint32_t miRodId = m_srcIdMap->getRodID(); + const uint32_t miRodId = m_srcIdMap.getRodID(); // check ROD source ID const uint32_t rodId = rob->rod_source_id(); diff --git a/Trigger/TrigT1/TrigT1ResultByteStream/src/MuCTPISrcIdMap.cxx b/Trigger/TrigT1/TrigT1ResultByteStream/src/MuCTPISrcIdMap.cxx index 8db3b7d9a42e..a6bee524657b 100755 --- a/Trigger/TrigT1/TrigT1ResultByteStream/src/MuCTPISrcIdMap.cxx +++ b/Trigger/TrigT1/TrigT1ResultByteStream/src/MuCTPISrcIdMap.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #include "eformat/SourceIdentifier.h" @@ -9,27 +9,23 @@ using eformat::helper::SourceIdentifier; -MuCTPISrcIdMap::MuCTPISrcIdMap() { - -} - -uint32_t MuCTPISrcIdMap::getRodID() { +uint32_t MuCTPISrcIdMap::getRodID() const { SourceIdentifier helpID( eformat::TDAQ_MUON_CTP_INTERFACE, 0 ); return helpID.code(); } -uint32_t MuCTPISrcIdMap::getRobID( uint32_t /*rod_id*/ ) { +uint32_t MuCTPISrcIdMap::getRobID( uint32_t /*rod_id*/ ) const { SourceIdentifier helpID( eformat::TDAQ_MUON_CTP_INTERFACE, 0 ); return helpID.code(); } -uint32_t MuCTPISrcIdMap::getRosID( uint32_t rob_id ) { +uint32_t MuCTPISrcIdMap::getRosID( uint32_t rob_id ) const { SourceIdentifier id = SourceIdentifier( rob_id ); SourceIdentifier id2 = SourceIdentifier( id.subdetector_id(), 0 ); return id2.code(); } -uint32_t MuCTPISrcIdMap::getDetID( uint32_t ros_id ) { +uint32_t MuCTPISrcIdMap::getDetID( uint32_t ros_id ) const { SourceIdentifier id = SourceIdentifier( ros_id ); SourceIdentifier id2 = SourceIdentifier( id.subdetector_id(), 0 ); return id2.code(); diff --git a/Trigger/TrigT1/TrigT1ResultByteStream/src/RecCTPByteStreamCnv.cxx b/Trigger/TrigT1/TrigT1ResultByteStream/src/RecCTPByteStreamCnv.cxx index 6258ff4da1cf..a4c7fbc0279a 100755 --- a/Trigger/TrigT1/TrigT1ResultByteStream/src/RecCTPByteStreamCnv.cxx +++ b/Trigger/TrigT1/TrigT1ResultByteStream/src/RecCTPByteStreamCnv.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ @@ -16,7 +16,6 @@ // Local include(s): #include "TrigT1ResultByteStream/RecCTPByteStreamCnv.h" -#include "TrigT1ResultByteStream/CTPSrcIdMap.h" /** * The constructor sets up all the ToolHandle and ServiceHandle objects and initialises the @@ -24,24 +23,11 @@ */ RecCTPByteStreamCnv::RecCTPByteStreamCnv( ISvcLocator* svcloc ) : Converter( storageType(), classID(), svcloc ), - m_tool( "RecCTPByteStreamTool" ), m_srcIdMap( 0 ), + m_tool( "RecCTPByteStreamTool" ), m_robDataProvider( "ROBDataProviderSvc", "RecCTPByteStreamCnv" ) { } -/** - * The destructor actually does some cleanup, it deletes the CTPSrcIdMap - * object that is created in the initialize() function. - */ -RecCTPByteStreamCnv::~RecCTPByteStreamCnv() { - - if( m_srcIdMap ) { - delete m_srcIdMap; - m_srcIdMap = 0; - } - -} - /** * Function telling the framework the Class ID of the object that this converter * is for (CTP_RIO). @@ -81,11 +67,6 @@ StatusCode RecCTPByteStreamCnv::initialize() { ATH_CHECK( m_robDataProvider.retrieve() ); log << MSG::DEBUG << "Connected to ROBDataProviderSvc" << endmsg; - // - // Create CTPSrcIdMap: - // - m_srcIdMap = new CTPSrcIdMap(); - return StatusCode::SUCCESS; } @@ -111,7 +92,7 @@ StatusCode RecCTPByteStreamCnv::createObj( IOpaqueAddress* pAddr, DataObject*& p // // Get SourceID: // - const uint32_t robId = m_srcIdMap->getRobID( m_srcIdMap->getRodID() ); + const uint32_t robId = m_srcIdMap.getRobID( m_srcIdMap.getRodID() ); log << MSG::DEBUG << "expected ROB sub-detector ID: " << std::hex << robId << std::dec << endmsg; diff --git a/Trigger/TrigT1/TrigT1ResultByteStream/src/RecCTPByteStreamTool.cxx b/Trigger/TrigT1/TrigT1ResultByteStream/src/RecCTPByteStreamTool.cxx index f29af7aaf38c..415d731e8e7f 100755 --- a/Trigger/TrigT1/TrigT1ResultByteStream/src/RecCTPByteStreamTool.cxx +++ b/Trigger/TrigT1/TrigT1ResultByteStream/src/RecCTPByteStreamTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ // Trigger include(s): @@ -25,35 +25,11 @@ const InterfaceID & RecCTPByteStreamTool::interfaceID() { */ RecCTPByteStreamTool::RecCTPByteStreamTool( const std::string& type, const std::string& name, const IInterface* parent ) - : AthAlgTool( type, name, parent ), m_srcIdMap( 0 ) { + : AthAlgTool( type, name, parent ) { declareInterface< RecCTPByteStreamTool >( this ); } -/** - * The destructor doesn't do anything. - */ -RecCTPByteStreamTool::~RecCTPByteStreamTool() { - -} - -/** - * The function creates a CTPSrcIdMap object that is used in the conversion - * and initialises the base class. - */ -StatusCode RecCTPByteStreamTool::initialize() { - m_srcIdMap = new CTPSrcIdMap(); - return StatusCode::SUCCESS; -} - -/** - * The function deletes the CTPSrcIdMap object and finalises the base class. - */ -StatusCode RecCTPByteStreamTool::finalize() { - delete m_srcIdMap; - return StatusCode::SUCCESS; -} - /** * Conversion from eformat::ROBFragment to RIO. * This is called from the RecCTPByteStreamCnv::createObj method. @@ -62,7 +38,7 @@ StatusCode RecCTPByteStreamTool::convert( const ROBF* rob, CTP_RIO*& result ) { ATH_MSG_DEBUG("executing convert() from ROBFragment to RIO"); - const uint32_t ctpRodId = m_srcIdMap->getRodID(); + const uint32_t ctpRodId = m_srcIdMap.getRodID(); const uint32_t rodId = rob->rod_source_id(); ATH_MSG_DEBUG(" expected ROD sub-detector ID: 0x" << std::hex << ctpRodId diff --git a/Trigger/TrigT1/TrigT1ResultByteStream/src/RecMuCTPIByteStreamCnv.cxx b/Trigger/TrigT1/TrigT1ResultByteStream/src/RecMuCTPIByteStreamCnv.cxx index cd9d99bedb12..50d72b0bf3f7 100755 --- a/Trigger/TrigT1/TrigT1ResultByteStream/src/RecMuCTPIByteStreamCnv.cxx +++ b/Trigger/TrigT1/TrigT1ResultByteStream/src/RecMuCTPIByteStreamCnv.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ @@ -15,7 +15,6 @@ // Local include(s): #include "TrigT1ResultByteStream/RecMuCTPIByteStreamCnv.h" -#include "TrigT1ResultByteStream/MuCTPISrcIdMap.h" /** * The constructor sets up all the ToolHandle and ServiceHandle objects and initialises the @@ -23,24 +22,11 @@ */ RecMuCTPIByteStreamCnv::RecMuCTPIByteStreamCnv( ISvcLocator* svcloc ) : Converter( storageType(), classID(), svcloc ), - m_tool( "RecMuCTPIByteStreamTool" ), m_srcIdMap( 0 ), + m_tool( "RecMuCTPIByteStreamTool" ), m_robDataProvider( "ROBDataProviderSvc", "RecMuCTPIByteStreamCnv" ) { } -/** - * The destructor actually does some cleanup, it deletes the CTPSrcIdMap - * object that is created in the initialize() function. - */ -RecMuCTPIByteStreamCnv::~RecMuCTPIByteStreamCnv() { - - if( m_srcIdMap ) { - delete m_srcIdMap; - m_srcIdMap = 0; - } - -} - /** * Function telling the framework the Class ID of the object that this converter * is for (CTP_RIO). @@ -80,13 +66,7 @@ StatusCode RecMuCTPIByteStreamCnv::initialize() { ATH_CHECK( m_robDataProvider.retrieve() ); log << MSG::DEBUG << "Connected to ROBDataProviderSvc" << endmsg; - // - // Create MuCTPISrcIdMap: - // - m_srcIdMap = new MuCTPISrcIdMap(); - return StatusCode::SUCCESS; - } /** @@ -109,7 +89,7 @@ StatusCode RecMuCTPIByteStreamCnv::createObj( IOpaqueAddress* pAddr, DataObject* log << MSG::DEBUG << " Creating Objects " << *( pBS_Addr->par() ) << endmsg; // get SourceID - const uint32_t robId = m_srcIdMap->getRobID( m_srcIdMap->getRodID() ); + const uint32_t robId = m_srcIdMap.getRobID( m_srcIdMap.getRodID() ); std::vector< uint32_t > vID; vID.push_back( robId ); @@ -129,7 +109,7 @@ StatusCode RecMuCTPIByteStreamCnv::createObj( IOpaqueAddress* pAddr, DataObject* // size check if ( robFrags.size() != 1 ) { log << MSG::WARNING << " Number of ROB fragments for source ROB ID " << MSG::hex << newRobId << " (ROD ID " - << m_srcIdMap->getRodID() << MSG::dec << ") is " << robFrags.size() << endmsg; + << m_srcIdMap.getRodID() << MSG::dec << ") is " << robFrags.size() << endmsg; MuCTPI_RIO * result = new MuCTPI_RIO; pObj = SG::asStorable( result ) ; return StatusCode::SUCCESS; diff --git a/Trigger/TrigT1/TrigT1ResultByteStream/src/RecMuCTPIByteStreamTool.cxx b/Trigger/TrigT1/TrigT1ResultByteStream/src/RecMuCTPIByteStreamTool.cxx index 3de7a40b0157..9075125d67a8 100755 --- a/Trigger/TrigT1/TrigT1ResultByteStream/src/RecMuCTPIByteStreamTool.cxx +++ b/Trigger/TrigT1/TrigT1ResultByteStream/src/RecMuCTPIByteStreamTool.cxx @@ -15,7 +15,6 @@ // Local include(s): #include "TrigT1ResultByteStream/RecMuCTPIByteStreamTool.h" -#include "TrigT1ResultByteStream/MuCTPISrcIdMap.h" /// Unique interface ID of the tool that identifies it to the framweork static const InterfaceID IID_IRecMuCTPIByteStreamTool( "RecMuCTPIByteStreamTool", 1, 1 ); @@ -49,8 +48,6 @@ RecMuCTPIByteStreamTool::RecMuCTPIByteStreamTool( const std::string& type, const */ StatusCode RecMuCTPIByteStreamTool::initialize() { - m_srcIdMap = new MuCTPISrcIdMap; - StatusCode sc = m_rpcRoITool.retrieve(); if( sc.isFailure() ) { ATH_MSG_WARNING("Couldn't access RPC RecMuonRoISvc"); @@ -76,14 +73,6 @@ StatusCode RecMuCTPIByteStreamTool::initialize() { } -/** - * The function deletes the MuCTPISrcIdMap object and finalises the base class. - */ -StatusCode RecMuCTPIByteStreamTool::finalize() { - - delete m_srcIdMap; - return StatusCode::SUCCESS; -} /** * Conversion from eformat::ROBFragment to RIO. @@ -106,7 +95,7 @@ StatusCode RecMuCTPIByteStreamTool::convert( const ROBF* rob, MuCTPI_RIO*& resul } // Source ID of MIROD - const uint32_t miRodId = m_srcIdMap->getRodID(); + const uint32_t miRodId = m_srcIdMap.getRodID(); /* get ROD source ID */ uint32_t rodId = rob->rod_source_id(); -- GitLab