ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
TrigT1CaloByteStream
src
L1CaloErrorByteStreamCnv.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
6
#include <vector>
7
8
#include "
ByteStreamCnvSvcBase/ByteStreamAddress.h
"
9
10
#include "GaudiKernel/DataObject.h"
11
#include "GaudiKernel/IOpaqueAddress.h"
12
#include "GaudiKernel/ISvcLocator.h"
13
#include "GaudiKernel/StatusCode.h"
14
15
#include "
AthenaKernel/ClassID_traits.h
"
16
#include "
SGTools/StlVectorClids.h
"
17
#include "
AthenaKernel/StorableConversions.h
"
18
#include "
AthenaKernel/errorcheck.h
"
19
20
#include "
L1CaloErrorByteStreamTool.h
"
21
22
#include "
L1CaloErrorByteStreamCnv.h
"
23
24
namespace
LVL1BS
{
25
26
L1CaloErrorByteStreamCnv::L1CaloErrorByteStreamCnv
( ISvcLocator* svcloc )
27
:
AthConstConverter
(
storageType
(),
classID
(), svcloc,
"L1CaloErrorByteStreamCnv"
),
28
m_tool
(
"LVL1BS::L1CaloErrorByteStreamTool/L1CaloErrorByteStreamTool"
)
29
{
30
}
31
32
L1CaloErrorByteStreamCnv::~L1CaloErrorByteStreamCnv
()
33
{
34
}
35
36
// CLID
37
38
CLID
L1CaloErrorByteStreamCnv::classID
()
39
{
40
return
ClassID_traits<std::vector<unsigned int>
>::ID();
41
}
42
43
long
L1CaloErrorByteStreamCnv::storageType
()
44
{
45
return
ByteStreamAddress::storageType
();
46
}
47
48
// Init method gets all necessary services etc.
49
50
51
StatusCode
L1CaloErrorByteStreamCnv::initialize
()
52
{
53
ATH_CHECK
( Converter::initialize() );
54
ATH_CHECK
(
m_tool
.retrieve() );
55
56
return
StatusCode::SUCCESS;
57
}
58
59
// createObj should create the RDO from bytestream.
60
61
StatusCode
L1CaloErrorByteStreamCnv::createObjConst
( IOpaqueAddress* pAddr,
62
DataObject*& pObj )
const
63
{
64
ByteStreamAddress
*pBS_Addr;
65
pBS_Addr =
dynamic_cast<
ByteStreamAddress
*
>
( pAddr );
66
if
( !pBS_Addr ) {
67
ATH_MSG_ERROR
(
" Can not cast to ByteStreamAddress "
);
68
return
StatusCode::FAILURE;
69
}
70
71
const
std::string nm = *( pBS_Addr->par() );
72
73
ATH_MSG_DEBUG
(
" Creating Objects "
<< nm );
74
75
auto
errCollection = std::make_unique<std::vector<unsigned int> >();
76
77
ATH_CHECK
(
m_tool
->errors(errCollection.get()) );
78
79
pObj =
SG::asStorable
(std::move(errCollection));
80
81
return
StatusCode::SUCCESS;
82
}
83
84
}
// end namespace
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
ClassID_traits.h
a traits class that associates a CLID to a type T It also detects whether T inherits from Gaudi DataO...
errorcheck.h
Helpers for checking error return status codes and reporting errors.
CLID
uint32_t CLID
The Class ID type.
Definition
Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
L1CaloErrorByteStreamCnv.h
L1CaloErrorByteStreamTool.h
StlVectorClids.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
LVL1BS::L1CaloErrorByteStreamCnv::storageType
static long storageType()
Definition
L1CaloErrorByteStreamCnv.cxx:43
LVL1BS::L1CaloErrorByteStreamCnv::~L1CaloErrorByteStreamCnv
virtual ~L1CaloErrorByteStreamCnv()
Definition
L1CaloErrorByteStreamCnv.cxx:32
LVL1BS::L1CaloErrorByteStreamCnv::createObjConst
virtual StatusCode createObjConst(IOpaqueAddress *pAddr, DataObject *&pObj) const override
Create error vector from ByteStream.
Definition
L1CaloErrorByteStreamCnv.cxx:61
LVL1BS::L1CaloErrorByteStreamCnv::m_tool
ToolHandle< LVL1BS::L1CaloErrorByteStreamTool > m_tool
Tool that does the actual work.
Definition
L1CaloErrorByteStreamCnv.h:49
LVL1BS::L1CaloErrorByteStreamCnv::initialize
virtual StatusCode initialize() override
Definition
L1CaloErrorByteStreamCnv.cxx:51
LVL1BS::L1CaloErrorByteStreamCnv::L1CaloErrorByteStreamCnv
L1CaloErrorByteStreamCnv(ISvcLocator *svcloc)
Definition
L1CaloErrorByteStreamCnv.cxx:26
LVL1BS::L1CaloErrorByteStreamCnv::classID
static CLID classID()
Definition
L1CaloErrorByteStreamCnv.cxx:38
LVL1BS
Definition
ZdcModifySlices.h:10
SG::asStorable
DataObject * asStorable(SG::DataObjectSharedPtr< T > pObject)
Definition
DataObjectSharedPtr.h:31
ClassID_traits
Default, invalid implementation of ClassID_traits.
Definition
Control/AthenaKernel/AthenaKernel/ClassID_traits.h:37
Generated on
for ATLAS Offline Software by
1.17.0