ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonCnv
MuonByteStream
src
RpcPadContByteStreamCnv.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
MuonByteStream/RpcPadContByteStreamCnv.h
"
6
7
#include <string>
8
9
#include "
AthenaBaseComps/AthCheckMacros.h
"
10
#include "
AthenaKernel/StorableConversions.h
"
11
#include "GaudiKernel/IRegistry.h"
12
#include "
ByteStreamCnvSvcBase/ByteStreamAddress.h
"
13
#include "
MuonRDO/RpcPadContainer.h
"
14
15
RpcPadContByteStreamCnv::RpcPadContByteStreamCnv
(ISvcLocator* svcloc) :
16
AthConstConverter
(
storageType
(),
classID
(), svcloc,
"RpcPadContByteStreamCnv"
),
m_tool
(
"Muon::RpcPadContByteStreamTool"
) {}
17
18
CLID
RpcPadContByteStreamCnv::classID
() {
return
ClassID_traits<RpcPadContainer>::ID
(); }
19
20
long
RpcPadContByteStreamCnv::storageType
() {
return
ByteStreamAddress::storageType
(); }
21
22
StatusCode
RpcPadContByteStreamCnv::initialize
() {
23
ATH_MSG_DEBUG
(
" initialize "
);
24
ATH_CHECK
(AthConstConverter::initialize());
25
ATH_CHECK
(
m_tool
.retrieve());
26
return
StatusCode::SUCCESS;
27
}
28
29
StatusCode
RpcPadContByteStreamCnv::createRepConst
(DataObject* pObj, IOpaqueAddress*& pAddr)
const
{
30
RpcPadContainer
* cont =
nullptr
;
31
SG::fromStorable
(pObj, cont);
32
if
(!cont) {
33
ATH_MSG_ERROR
(
" Can not cast to RpcPadContainer "
);
34
return
StatusCode::FAILURE;
35
}
36
37
std::string nm = pObj->registry()->name();
38
pAddr =
new
ByteStreamAddress
(
classID
(), nm,
""
);
39
return
m_tool
->convert(cont);
40
}
AthCheckMacros.h
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition
AthMsgStreamMacros.h:33
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
ByteStreamAddress.h
CLID
uint32_t CLID
The Class ID type.
Definition
Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
RpcPadContByteStreamCnv.h
RpcPadContainer.h
StorableConversions.h
convert to and from a SG storable
AthConstConverter::AthConstConverter
AthConstConverter(long storage_type, const CLID &class_type, ISvcLocator *svc, const std::string &name)
Definition
AthConstConverter.h:35
ByteStreamAddress
IOpaqueAddress for ByteStreamCnvSvc, with ROB ids.
Definition
ByteStreamAddress.h:28
ByteStreamAddress::storageType
static constexpr long storageType()
Definition
ByteStreamAddress.h:51
RpcPadContByteStreamCnv::storageType
static long storageType()
Definition
RpcPadContByteStreamCnv.cxx:20
RpcPadContByteStreamCnv::RpcPadContByteStreamCnv
RpcPadContByteStreamCnv(ISvcLocator *svcloc)
Definition
RpcPadContByteStreamCnv.cxx:15
RpcPadContByteStreamCnv::m_tool
ToolHandle< Muon::IRPC_RDOtoByteStreamTool > m_tool
Definition
RpcPadContByteStreamCnv.h:31
RpcPadContByteStreamCnv::initialize
virtual StatusCode initialize() override
Definition
RpcPadContByteStreamCnv.cxx:22
RpcPadContByteStreamCnv::classID
static CLID classID()
Definition
RpcPadContByteStreamCnv.cxx:18
RpcPadContByteStreamCnv::createRepConst
virtual StatusCode createRepConst(DataObject *pObj, IOpaqueAddress *&pAddr) const override
Convert the transient object to the requested representation.
Definition
RpcPadContByteStreamCnv.cxx:29
RpcPadContainer
Use IdentifiableContainer with RpcPad.
Definition
RpcPadContainer.h:23
SG::fromStorable
bool fromStorable(DataObject *pDObj, T *&pTrans, bool quiet=false, IRegisterTransient *irt=0, bool isConst=true)
Definition
StorableConversions.h:169
ClassID_traits::ID
static constexpr CLID ID()
Definition
Control/AthenaKernel/AthenaKernel/ClassID_traits.h:44
Generated on
for ATLAS Offline Software by
1.17.0