diff --git a/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_RawDataByteStreamCnv/LUCID_RawDataByteStreamCnv/LUCID_DigitByteStreamCnv.h b/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_RawDataByteStreamCnv/LUCID_RawDataByteStreamCnv/LUCID_DigitByteStreamCnv.h index d3cc49be2296eeaacf183a16d64e195b18c88e27..a5c0e56a9ec316482ba8bcace6b8514c23c325a8 100644 --- a/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_RawDataByteStreamCnv/LUCID_RawDataByteStreamCnv/LUCID_DigitByteStreamCnv.h +++ b/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_RawDataByteStreamCnv/LUCID_RawDataByteStreamCnv/LUCID_DigitByteStreamCnv.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // ************************************************************************* @@ -41,8 +41,6 @@ #include "LUCID_RawEvent/LUCID_DigitContainer.h" #include "LUCID_RawDataByteStreamCnv/LUCID_RodEncoder.h" -extern long ByteStream_StorageType; - typedef std::map<uint32_t, LUCID_RodEncoder> LucidRodEncoder_map; class LUCID_DigitByteStreamCnv: public Converter { @@ -51,17 +49,16 @@ class LUCID_DigitByteStreamCnv: public Converter { LUCID_DigitByteStreamCnv(ISvcLocator* svcloc); - virtual StatusCode initialize(); + virtual StatusCode initialize() override; // create the RawEvent fragments for LUCID - virtual StatusCode createRep(DataObject* pObj, IOpaqueAddress*& pAddr); - - virtual long repSvcType() const { return ByteStream_StorageType; } - static long storageType() { return ByteStream_StorageType; } + virtual StatusCode createRep(DataObject* pObj, IOpaqueAddress*& pAddr) override; + virtual long repSvcType() const override { return i_repSvcType(); } + static long storageType(); static const CLID& classID(); - virtual StatusCode fillFEA(LUCID_DigitContainer* RDO_container, RawEventWrite* re); + StatusCode fillFEA(LUCID_DigitContainer* RDO_container, RawEventWrite* re); unsigned short RodBlockVersion(void) { return m_RodBlockVersion; } int BCs_per_LVL1ID (void) { return m_BCs_per_LVL1ID; } diff --git a/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_RawDataByteStreamCnv/src/LUCID_DigitByteStreamCnv.cxx b/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_RawDataByteStreamCnv/src/LUCID_DigitByteStreamCnv.cxx index 21d35a1d091c64af904e72ed581361a9c6a02a54..2ab71fb064b4022717ef6881c403da0816bb921d 100644 --- a/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_RawDataByteStreamCnv/src/LUCID_DigitByteStreamCnv.cxx +++ b/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_RawDataByteStreamCnv/src/LUCID_DigitByteStreamCnv.cxx @@ -1,12 +1,12 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "LUCID_RawDataByteStreamCnv/LUCID_DigitByteStreamCnv.h" LUCID_DigitByteStreamCnv::LUCID_DigitByteStreamCnv(ISvcLocator* svcloc) : - Converter(ByteStream_StorageType, classID(), svcloc), + Converter(storageType(), classID(), svcloc), m_RodBlockVersion (0), m_BCs_per_LVL1ID (1) { @@ -35,6 +35,11 @@ const CLID& LUCID_DigitByteStreamCnv::classID() { return ClassID_traits<LUCID_DigitContainer>::ID(); } +long LUCID_DigitByteStreamCnv::storageType() { + + return ByteStreamAddress::storageType(); +} + StatusCode LUCID_DigitByteStreamCnv::createRep(DataObject* pObj, IOpaqueAddress*& pAddr) { if (msgLevel(MSG::DEBUG)) msg(MSG::DEBUG) << " LUCID_DigitByteStreamCnv::createRep" << endmsg; diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcByteStream/ZdcByteStream/ZdcByteStreamCnv.h b/ForwardDetectors/ZDC/ZdcCnv/ZdcByteStream/ZdcByteStream/ZdcByteStreamCnv.h index 7707c860c421d536219d902a7212d61212940f3c..4fd81ade53c8a6e419472b7210947d19f7229515 100644 --- a/ForwardDetectors/ZDC/ZdcCnv/ZdcByteStream/ZdcByteStream/ZdcByteStreamCnv.h +++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcByteStream/ZdcByteStream/ZdcByteStreamCnv.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef ZDCBYTESTREAMCNV_H @@ -42,8 +42,6 @@ class ZdcByteStreamReadV1V2Tool; // Abstract factory to create the converter template <typename > class CnvFactory; -extern long ByteStream_StorageType; - /** * The converter class has the methods to create the collection objects from a file * (RDO to ByteStream) and ByteStream from RDO. @@ -55,19 +53,14 @@ public: virtual ~ZdcByteStreamCnv(); - virtual StatusCode initialize(); - virtual StatusCode createObj(IOpaqueAddress* pAddr, DataObject*& pObj); - //virtual StatusCode createRep(DataObject* pObj, IOpaqueAddress*& pAddr); + virtual StatusCode initialize() override; + virtual StatusCode createObj(IOpaqueAddress* pAddr, DataObject*& pObj) override; + //virtual StatusCode createRep(DataObject* pObj, IOpaqueAddress*& pAddr) override; /// Storage type and class ID - virtual long repSvcType() const - { - return ByteStream_StorageType; - } - static long storageType() - { - return ByteStream_StorageType; - } + virtual long repSvcType() const override { return i_repSvcType(); } + + static long storageType(); static const CLID& classID(); private: diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcByteStream/src/ZdcByteStreamCnv.cxx b/ForwardDetectors/ZDC/ZdcCnv/ZdcByteStream/src/ZdcByteStreamCnv.cxx index 3c77c062e3e43fdb5cf500059b8332b99c96c6dc..a8c48afd51221f6238cc22583e385046d4c5b7a6 100644 --- a/ForwardDetectors/ZDC/ZdcCnv/ZdcByteStream/src/ZdcByteStreamCnv.cxx +++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcByteStream/src/ZdcByteStreamCnv.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** @@ -51,7 +51,7 @@ //================================================================================================== ZdcByteStreamCnv::ZdcByteStreamCnv(ISvcLocator* svcloc) : - Converter(ByteStream_StorageType, classID(), svcloc), m_name("ZdcByteStreamCnv"), + Converter(storageType(), classID(), svcloc), m_name("ZdcByteStreamCnv"), //m_tool("ZdcByteStreamTool/ZdcByteStreamTool"), // old style m_tool("ZdcByteStreamReadV1V2Tool/ZdcByteStreamReadV1V2Tool"), // new style m_robDataProvider("ROBDataProviderSvc",m_name), @@ -78,6 +78,13 @@ const CLID& ZdcByteStreamCnv::classID() } //================================================================================================== +//================================================================================================== +long ZdcByteStreamCnv::storageType() +{ + return ByteStreamAddress::storageType(); +} +//================================================================================================== + //================================================================================================== StatusCode ZdcByteStreamCnv::initialize() diff --git a/TestBeam/TBCnv/TBCnv/TBDataCnv.h b/TestBeam/TBCnv/TBCnv/TBDataCnv.h index 48fe7668afb8f5138af314d80578f046592b34f5..93a2495551a4e95671ecb8211ba2395fea0a1991 100644 --- a/TestBeam/TBCnv/TBCnv/TBDataCnv.h +++ b/TestBeam/TBCnv/TBCnv/TBDataCnv.h @@ -1,7 +1,7 @@ //Dear emacs, this is -*- c++ -*- /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef TESTBEAM_BYTESTREAM_DATA_CNV @@ -14,22 +14,19 @@ // Abstract factory to create the converter template <class TYPE> class CnvFactory; -// Externals -extern unsigned char ByteStream_StorageType; - -template< class DATATYPE > +template< class DATATYPE > class TBDataCnv: public Converter { public: TBDataCnv(ISvcLocator* svcloc); - virtual StatusCode initialize(); - virtual StatusCode createObj(IOpaqueAddress* pAddr, DataObject*& pObj); - virtual StatusCode createRep(DataObject* pObj, IOpaqueAddress*& pAddr); + virtual StatusCode initialize() override; + virtual StatusCode createObj(IOpaqueAddress* pAddr, DataObject*& pObj) override; + virtual StatusCode createRep(DataObject* pObj, IOpaqueAddress*& pAddr) override; /// Storage type and class ID - virtual long repSvcType() const { return ByteStream_StorageType; } - static long storageType() { return ByteStream_StorageType; } + virtual long repSvcType() const override { return i_repSvcType(); } + static long storageType(); static const CLID& classID(); private: diff --git a/TestBeam/TBCnv/TBCnv/TBDataCnv.icc b/TestBeam/TBCnv/TBCnv/TBDataCnv.icc index 94ec96e12a96db5f390390203c7a396bef599fe3..4a7467157c18c057d902c0aa746c3eb81b94ec69 100644 --- a/TestBeam/TBCnv/TBCnv/TBDataCnv.icc +++ b/TestBeam/TBCnv/TBCnv/TBDataCnv.icc @@ -1,16 +1,17 @@ //Dear emacs, this is -*- c++ -*- /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "GaudiKernel/MsgStream.h" +#include "ByteStreamCnvSvcBase/ByteStreamAddress.h" #include <string> template< class DATATYPE > TBDataCnv<DATATYPE>::TBDataCnv(ISvcLocator* svcloc) : - Converter(ByteStream_StorageType, classID(),svcloc), + Converter(storageType(), classID(),svcloc), m_tool(nullptr) { } @@ -20,6 +21,11 @@ const CLID& TBDataCnv<DATATYPE>::classID(){ return ClassID_traits<DATATYPE>::ID() ; } +template< class DATATYPE > +long TBDataCnv<DATATYPE>::storageType(){ + return ByteStreamAddress::storageType() ; +} + template< class DATATYPE > StatusCode TBDataCnv<DATATYPE>::initialize() {StatusCode sc = Converter::initialize();