ATLAS Offline Software
RpcPadContByteStreamCnv.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 #include <string>
8 
11 #include "GaudiKernel/IRegistry.h"
14 
16  AthConstConverter(storageType(), classID(), svcloc, "RpcPadContByteStreamCnv"), m_tool("Muon::RpcPadContByteStreamTool") {}
17 
19 
21 
23  ATH_MSG_DEBUG(" 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
SG::fromStorable
bool fromStorable(DataObject *pDObj, T *&pTrans, bool quiet=false, IRegisterTransient *irt=0, bool isConst=true)
Definition: StorableConversions.h:167
StorableConversions.h
convert to and from a SG storable
initialize
void initialize()
Definition: run_EoverP.cxx:894
AthConstConverter
Gaudi converter base class with const interfaces.
Definition: AthConstConverter.h:33
ClassID_traits::ID
static const CLID & ID()
the CLID of T
Definition: Control/AthenaKernel/AthenaKernel/ClassID_traits.h:50
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
RpcPadContByteStreamCnv::storageType
static long storageType()
Definition: RpcPadContByteStreamCnv.cxx:20
RpcPadContByteStreamCnv::classID
static const CLID & classID()
Definition: RpcPadContByteStreamCnv.cxx:18
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
ByteStreamAddress
IOpaqueAddress for ByteStreamCnvSvc, with ROB ids.
Definition: ByteStreamAddress.h:28
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
ByteStreamAddress.h
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
RpcPadContByteStreamCnv::m_tool
ToolHandle< Muon::IRPC_RDOtoByteStreamTool > m_tool
Definition: RpcPadContByteStreamCnv.h:31
ByteStreamAddress::storageType
static constexpr long storageType()
Definition: ByteStreamAddress.h:51
RpcPadContByteStreamCnv.h
CalibCoolCompareRT.nm
nm
Definition: CalibCoolCompareRT.py:110
RpcPadContainer.h
RpcPadContByteStreamCnv::initialize
virtual StatusCode initialize() override
Definition: RpcPadContByteStreamCnv.cxx:22
RpcPadContByteStreamCnv::createRepConst
virtual StatusCode createRepConst(DataObject *pObj, IOpaqueAddress *&pAddr) const override
Convert the transient object to the requested representation.
Definition: RpcPadContByteStreamCnv.cxx:29
RpcPadContByteStreamCnv::RpcPadContByteStreamCnv
RpcPadContByteStreamCnv(ISvcLocator *svcloc)
Definition: RpcPadContByteStreamCnv.cxx:15
RpcPadContainer
Use IdentifiableContainer with RpcPad.
Definition: RpcPadContainer.h:23