ATLAS Offline Software
MdtCsmContByteStreamCnv.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
12 
14  AthConstConverter(storageType(), classID(), svcloc, "MdtCsmContByteStreamCnv"), m_tool("Muon::MdtCsmContByteStreamTool") {}
15 
17 
19 
21  ATH_MSG_DEBUG(" initialize ");
23  ATH_CHECK(m_tool.retrieve());
24  return StatusCode::SUCCESS;
25 }
26 
27 StatusCode MdtCsmContByteStreamCnv::createRepConst(DataObject* pObj, IOpaqueAddress*& pAddr) const {
28  MdtCsmContainer* cont = nullptr;
29  SG::fromStorable(pObj, cont);
30  if (!cont) {
31  ATH_MSG_ERROR(" Can not cast to MdtCsmContainer ");
32  return StatusCode::FAILURE;
33  }
34 
35  std::string nm = pObj->registry()->name();
36  pAddr = new ByteStreamAddress(classID(), nm, "");
37  return m_tool->convert(cont, msg());
38 }
AthCheckMacros.h
MdtCsmContByteStreamCnv.h
SG::fromStorable
bool fromStorable(DataObject *pDObj, T *&pTrans, bool quiet=false, IRegisterTransient *irt=0, bool isConst=true)
Definition: StorableConversions.h:180
StorableConversions.h
convert to and from a SG storable
initialize
void initialize()
Definition: run_EoverP.cxx:894
MdtCsmContainer
This container provides acces to the MDT RDOs.
Definition: MdtCsmContainer.h:22
AthConstConverter
Gaudi converter base class with const interfaces.
Definition: AthConstConverter.h:33
MdtCsmContainer.h
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
MdtCsmContByteStreamCnv::m_tool
ToolHandle< Muon::IMDT_RDOtoByteStreamTool > m_tool
Definition: MdtCsmContByteStreamCnv.h:29
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
MdtCsmContByteStreamCnv::createRepConst
virtual StatusCode createRepConst(DataObject *pObj, IOpaqueAddress *&pAddr) const override
Convert the transient object to the requested representation.
Definition: MdtCsmContByteStreamCnv.cxx:27
ByteStreamAddress
IOpaqueAddress for ByteStreamCnvSvc, with ROB ids.
Definition: ByteStreamAddress.h:28
MdtCsmContByteStreamCnv::storageType
static long storageType()
Definition: MdtCsmContByteStreamCnv.cxx:18
MdtCsmContByteStreamCnv::classID
static const CLID & classID()
Definition: MdtCsmContByteStreamCnv.cxx:16
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
AthMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AthMessaging.h:164
ByteStreamAddress::storageType
static constexpr long storageType()
Definition: ByteStreamAddress.h:51
MdtCsmContByteStreamCnv::initialize
virtual StatusCode initialize() override
Definition: MdtCsmContByteStreamCnv.cxx:20
CalibCoolCompareRT.nm
nm
Definition: CalibCoolCompareRT.py:110
MdtCsmContByteStreamCnv::MdtCsmContByteStreamCnv
MdtCsmContByteStreamCnv(ISvcLocator *svcloc)
Definition: MdtCsmContByteStreamCnv.cxx:13
IMDT_RDOtoByteStreamTool.h