Skip to content
Snippets Groups Projects
Commit 15d71d2f authored by Edward Moyse's avatar Edward Moyse
Browse files

Merge branch 'bytestream_storagetype_misc' into 'master'

Remove usage of "extern" ByteStream_StorageType

See merge request atlas/athena!21420
parents a5a44a9a 12b89a36
No related branches found
No related tags found
No related merge requests found
/*
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; }
......
/*
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;
......
/*
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:
......
/*
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()
......
//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:
......
//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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment