ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetEventCnv
TRT_RawDataByteStreamCnv
src
TRTRawContByteStreamCnv.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
TRTRawContByteStreamCnv.h
"
6
7
#include "
ByteStreamData/RawEvent.h
"
8
#include "
AthenaKernel/StorableConversions.h
"
9
#include "GaudiKernel/DataObject.h"
10
#include "GaudiKernel/MsgStream.h"
11
#include <string>
12
// ------------------------------------------------------
13
// constructor
14
15
TRTRawContByteStreamCnv::TRTRawContByteStreamCnv
(ISvcLocator* svcloc) :
16
AthConstConverter
(
storageType
(),
classID
(),svcloc,
"TRTRawContByteStreamCnv"
),
17
m_tool
(
"TRTRawContByteStreamTool"
)
// init tool handles
18
{}
19
20
// ------------------------------------------------------
21
// initialize
22
23
StatusCode
24
TRTRawContByteStreamCnv::initialize
()
25
{
26
ATH_CHECK
( AthConstConverter::initialize() );
27
28
ATH_MSG_DEBUG
(
" initialize "
);
29
30
// Retrieve byte stream tool
31
ATH_CHECK
(
m_tool
.retrieve() );
32
ATH_MSG_INFO
(
"Retrieved tool "
<<
m_tool
);
33
34
ATH_MSG_INFO
(
"Leaving TRTRawContByteStreamCnv::initialize()"
);
35
return
StatusCode::SUCCESS;
36
37
}
38
39
// ------------------------------------------------------
40
// convert TRT Raw Data in the container into ByteStream
41
42
StatusCode
43
TRTRawContByteStreamCnv::createRepConst
(DataObject* pObj, IOpaqueAddress*& pAddr)
const
44
{
45
// get IDC for TRT Raw Data
46
TRT_RDO_Container
* cont=
nullptr
;
47
if
(!
SG::fromStorable
(pObj, cont)){
48
ATH_MSG_ERROR
(
" Can not cast to TRTRawContainer "
);
49
return
StatusCode::FAILURE;
50
}
51
52
// set up the IOpaqueAddress for Storegate
53
std::string nm = pObj->registry()->name();
54
pAddr =
new
ByteStreamAddress
(
classID
(),nm,
""
);
55
56
// now use the tool to do the conversion
57
ATH_CHECK
(
m_tool
->convert(cont) );
58
59
return
StatusCode::SUCCESS ;
60
}
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_INFO
#define ATH_MSG_INFO(x)
Definition
AthMsgStreamMacros.h:31
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
RawEvent.h
StorableConversions.h
convert to and from a SG storable
TRTRawContByteStreamCnv.h
TRT_RDO_Container
InDetRawDataContainer< InDetRawDataCollection< TRT_RDORawData > > TRT_RDO_Container
Definition
TRT_RDO_Container.h:26
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
TRTRawContByteStreamCnv::createRepConst
virtual StatusCode createRepConst(DataObject *pObj, IOpaqueAddress *&pAddr) const override
this creates the RawEvent fragments for the TRT
Definition
TRTRawContByteStreamCnv.cxx:43
TRTRawContByteStreamCnv::initialize
virtual StatusCode initialize() override
initialize
Definition
TRTRawContByteStreamCnv.cxx:24
TRTRawContByteStreamCnv::classID
static CLID classID()
Definition
TRTRawContByteStreamCnv.h:35
TRTRawContByteStreamCnv::storageType
static long storageType()
Definition
TRTRawContByteStreamCnv.h:34
TRTRawContByteStreamCnv::m_tool
ToolHandle< ITRTRawContByteStreamTool > m_tool
Definition
TRTRawContByteStreamCnv.h:49
TRTRawContByteStreamCnv::TRTRawContByteStreamCnv
TRTRawContByteStreamCnv(ISvcLocator *svcloc)
Definition
TRTRawContByteStreamCnv.cxx:15
SG::fromStorable
bool fromStorable(DataObject *pDObj, T *&pTrans, bool quiet=false, IRegisterTransient *irt=0, bool isConst=true)
Definition
StorableConversions.h:169
Generated on
for ATLAS Offline Software by
1.17.0