ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
DataModelTest
DataModelTestDataCommon
src
xAODTestReadSymlink.cxx
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration.
3
*/
10
11
12
#include "
xAODTestReadSymlink.h
"
13
#include "
StoreGate/ReadHandle.h
"
14
15
16
namespace
DMTest
{
17
18
19
xAODTestReadSymlink::xAODTestReadSymlink
(
const
std::string &name, ISvcLocator *pSvcLocator)
20
:
AthReentrantAlgorithm
(name, pSvcLocator)
21
{
22
declareProperty
(
"Key"
,
m_objKey
);
23
declareProperty
(
"S1Key"
,
m_s1Key
=
"S2"
);
24
declareProperty
(
"S2Key"
,
m_s2Key
=
"S2"
);
25
declareProperty
(
"AliasKey"
,
m_aliasKey
=
"S2alias"
);
26
}
27
28
29
StatusCode
xAODTestReadSymlink::initialize
()
30
{
31
ATH_CHECK
(
m_objKey
.initialize() );
32
ATH_CHECK
(
m_s1Key
.initialize() );
33
ATH_CHECK
(
m_s2Key
.initialize() );
34
ATH_CHECK
(
m_aliasKey
.initialize() );
35
return
StatusCode::SUCCESS;
36
}
37
38
39
StatusCode
xAODTestReadSymlink::execute
(
const
EventContext& ctx)
const
40
{
41
SG::ReadHandle<SG::AuxElement>
c (
m_objKey
, ctx);
42
SG::ReadHandle<DMTest::S1>
s1 (
m_s1Key
, ctx);
43
SG::ReadHandle<DMTest::S2>
s2 (
m_s2Key
, ctx);
44
SG::ReadHandle<DMTest::S2>
alias (
m_aliasKey
, ctx);
45
46
static
const
SG::Accessor<int>
anInt (
"anInt"
);
47
ATH_MSG_INFO
(
"C (as AuxElement): {}; S {}"
, anInt (*c), s2->m_x );
48
if
(s2.cptr() != s1.cptr() || s2.cptr() != alias.cptr())
49
ATH_MSG_ERROR
(
" S objects mismatch! "
);
50
return
StatusCode::SUCCESS;
51
}
52
53
54
}
// namespace DMTest
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:47
ATH_MSG_INFO
#define ATH_MSG_INFO(x,...)
Definition
AthMsgStreamMacros.h:45
ReadHandle.h
Handle class for reading from StoreGate.
AthCommonAlgorithm< Gaudi::Algorithm >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition
AthCommonDataStore.h:145
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition
AthReentrantAlgorithm.h:74
DMTest::xAODTestReadSymlink::xAODTestReadSymlink
xAODTestReadSymlink(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition
xAODTestReadSymlink.cxx:19
DMTest::xAODTestReadSymlink::execute
virtual StatusCode execute(const EventContext &ctx) const override
Algorithm event processing.
Definition
xAODTestReadSymlink.cxx:39
DMTest::xAODTestReadSymlink::m_aliasKey
SG::ReadHandleKey< DMTest::S2 > m_aliasKey
Definition
xAODTestReadSymlink.h:59
DMTest::xAODTestReadSymlink::m_s1Key
SG::ReadHandleKey< DMTest::S1 > m_s1Key
Definition
xAODTestReadSymlink.h:57
DMTest::xAODTestReadSymlink::m_objKey
SG::ReadHandleKey< SG::AuxElement > m_objKey
Definition
xAODTestReadSymlink.h:55
DMTest::xAODTestReadSymlink::initialize
virtual StatusCode initialize() override
Algorithm initialization; called at the beginning of the job.
Definition
xAODTestReadSymlink.cxx:29
DMTest::xAODTestReadSymlink::m_s2Key
SG::ReadHandleKey< DMTest::S2 > m_s2Key
Definition
xAODTestReadSymlink.h:58
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition
Control/AthContainers/AthContainers/Accessor.h:68
SG::ReadHandle
Definition
StoreGate/StoreGate/ReadHandle.h:66
DMTest
Definition
B.h:23
xAODTestReadSymlink.h
Test reading via a symlink.
Generated on
for ATLAS Offline Software by
1.17.0