ATLAS Offline Software
Loading...
Searching...
No Matches
xAODTestReadSymlinkTool.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
16
17
18namespace DMTest {
19
20
22 const std::string& name,
23 const IInterface* parent)
24 : base_class (type, name, parent)
25{
26 declareProperty ("Key", m_objKey);
27 declareProperty ("S1Key", m_s1Key = "S2");
28 declareProperty ("S2Key", m_s2Key = "S2");
29 declareProperty ("AliasKey", m_aliasKey = "S2alias");
30}
31
32
34{
35 ATH_CHECK( m_objKey.initialize() );
36 ATH_CHECK( m_s1Key.initialize() );
37 ATH_CHECK( m_s2Key.initialize() );
38 ATH_CHECK( m_aliasKey.initialize() );
39 return StatusCode::SUCCESS;
40}
41
42
43StatusCode xAODTestReadSymlinkTool::doit (const EventContext& ctx) const
44{
49
50 static const SG::AuxElement::Accessor<int> anInt ("anInt");
51 ATH_MSG_INFO( "From tool: C (as AuxElement): " << anInt (*c)
52 << "; S " << s2->m_x );
53 if (s2.cptr() != s1.cptr() || s2.cptr() != alias.cptr())
54 ATH_MSG_ERROR( " S objects mismatch! ");
55 return StatusCode::SUCCESS;
56}
57
58
59} // namespace DMTest
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
Handle class for reading from StoreGate.
xAODTestReadSymlinkTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor.
SG::ReadHandleKey< DMTest::S2 > m_aliasKey
virtual StatusCode initialize() override
Tool initialization; called at the beginning of the job.
virtual StatusCode doit(const EventContext &ctx) const override
Tool event processing.
SG::ReadHandleKey< SG::AuxElement > m_objKey
SG::ReadHandleKey< DMTest::S2 > m_s2Key
SG::ReadHandleKey< DMTest::S1 > m_s1Key
SG::Accessor< T, ALLOC > Accessor
Definition AuxElement.h:572
Definition B.h:23
Test reading via a symlink, as a tool.