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-2017 CERN for the benefit of the ATLAS collaboration.
3
*/
4
5
// $Id$
12
13
14
#include "
xAODTestReadSymlink.h
"
15
#include "
StoreGate/ReadHandle.h
"
16
17
18
namespace
DMTest
{
19
20
21
xAODTestReadSymlink::xAODTestReadSymlink
(
const
std::string &name, ISvcLocator *pSvcLocator)
22
:
AthReentrantAlgorithm
(name, pSvcLocator)
23
{
24
declareProperty
(
"Key"
,
m_objKey
);
25
declareProperty
(
"S1Key"
,
m_s1Key
=
"S2"
);
26
declareProperty
(
"S2Key"
,
m_s2Key
=
"S2"
);
27
declareProperty
(
"AliasKey"
,
m_aliasKey
=
"S2alias"
);
28
}
29
30
31
StatusCode
xAODTestReadSymlink::initialize
()
32
{
33
ATH_CHECK
(
m_objKey
.initialize() );
34
ATH_CHECK
(
m_s1Key
.initialize() );
35
ATH_CHECK
(
m_s2Key
.initialize() );
36
ATH_CHECK
(
m_aliasKey
.initialize() );
37
return
StatusCode::SUCCESS;
38
}
39
40
41
StatusCode
xAODTestReadSymlink::execute
(
const
EventContext& ctx)
const
42
{
43
SG::ReadHandle<SG::AuxElement>
c (
m_objKey
, ctx);
44
SG::ReadHandle<DMTest::S1>
s1 (
m_s1Key
, ctx);
45
SG::ReadHandle<DMTest::S2>
s2 (
m_s2Key
, ctx);
46
SG::ReadHandle<DMTest::S2>
alias (
m_aliasKey
, ctx);
47
48
static
const
SG::AuxElement::Accessor<int> anInt (
"anInt"
);
49
ATH_MSG_INFO
(
"C (as AuxElement): "
<< anInt (*c)
50
<<
"; S "
<< s2->m_x );
51
if
(s2.cptr() != s1.cptr() || s2.cptr() != alias.cptr())
52
ATH_MSG_ERROR
(
" S objects mismatch! "
);
53
return
StatusCode::SUCCESS;
54
}
55
56
57
}
// 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:33
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition
AthMsgStreamMacros.h:31
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:21
DMTest::xAODTestReadSymlink::execute
virtual StatusCode execute(const EventContext &ctx) const override
Algorithm event processing.
Definition
xAODTestReadSymlink.cxx:41
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:31
DMTest::xAODTestReadSymlink::m_s2Key
SG::ReadHandleKey< DMTest::S2 > m_s2Key
Definition
xAODTestReadSymlink.h:58
SG::ReadHandle
Definition
StoreGate/StoreGate/ReadHandle.h:67
DMTest
Definition
B.h:23
xAODTestReadSymlink.h
Test reading via a symlink.
Generated on
for ATLAS Offline Software by
1.17.0