ATLAS Offline Software
Loading...
Searching...
No Matches
DMTest::xAODTestReadSymlinkTool Class Reference

#include <xAODTestReadSymlinkTool.h>

Inheritance diagram for DMTest::xAODTestReadSymlinkTool:
Collaboration diagram for DMTest::xAODTestReadSymlinkTool:

Public Member Functions

 xAODTestReadSymlinkTool (const std::string &type, const std::string &name, const IInterface *parent)
 Constructor.
virtual StatusCode initialize () override
 Tool initialization; called at the beginning of the job.
virtual StatusCode doit (const EventContext &ctx) const override
 Tool event processing.

Private Attributes

SG::ReadHandleKey< SG::AuxElement > m_objKey
SG::ReadHandleKey< DMTest::S1 > m_s1Key
SG::ReadHandleKey< DMTest::S2 > m_s2Key
SG::ReadHandleKey< DMTest::S2 > m_aliasKey

Detailed Description

Definition at line 31 of file xAODTestReadSymlinkTool.h.

Constructor & Destructor Documentation

◆ xAODTestReadSymlinkTool()

DMTest::xAODTestReadSymlinkTool::xAODTestReadSymlinkTool ( const std::string & type,
const std::string & name,
const IInterface * parent )

Constructor.

Parameters
typeThe tool type.
nameThe tool name.
parentThe tool's parent.

Definition at line 19 of file xAODTestReadSymlinkTool.cxx.

22 : base_class (type, name, parent)
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}
SG::ReadHandleKey< DMTest::S2 > m_aliasKey
SG::ReadHandleKey< SG::AuxElement > m_objKey
SG::ReadHandleKey< DMTest::S2 > m_s2Key
SG::ReadHandleKey< DMTest::S1 > m_s1Key

Member Function Documentation

◆ doit()

StatusCode DMTest::xAODTestReadSymlinkTool::doit ( const EventContext & ctx) const
overridevirtual

Tool event processing.

Definition at line 41 of file xAODTestReadSymlinkTool.cxx.

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::Accessor<int> anInt ("anInt");
49 ATH_MSG_INFO( "From tool: C (as AuxElement): {}; S {}", anInt (*c), s2->m_x );
50 if (s2.cptr() != s1.cptr() || s2.cptr() != alias.cptr())
51 ATH_MSG_ERROR( " S objects mismatch! ");
52 return StatusCode::SUCCESS;
53}
#define ATH_MSG_ERROR(x,...)
#define ATH_MSG_INFO(x,...)

◆ initialize()

StatusCode DMTest::xAODTestReadSymlinkTool::initialize ( )
overridevirtual

Tool initialization; called at the beginning of the job.

Definition at line 31 of file xAODTestReadSymlinkTool.cxx.

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}
#define ATH_CHECK
Evaluate an expression and check for errors.

Member Data Documentation

◆ m_aliasKey

SG::ReadHandleKey<DMTest::S2> DMTest::xAODTestReadSymlinkTool::m_aliasKey
private

Definition at line 63 of file xAODTestReadSymlinkTool.h.

◆ m_objKey

SG::ReadHandleKey<SG::AuxElement> DMTest::xAODTestReadSymlinkTool::m_objKey
private

Definition at line 59 of file xAODTestReadSymlinkTool.h.

◆ m_s1Key

SG::ReadHandleKey<DMTest::S1> DMTest::xAODTestReadSymlinkTool::m_s1Key
private

Definition at line 61 of file xAODTestReadSymlinkTool.h.

◆ m_s2Key

SG::ReadHandleKey<DMTest::S2> DMTest::xAODTestReadSymlinkTool::m_s2Key
private

Definition at line 62 of file xAODTestReadSymlinkTool.h.


The documentation for this class was generated from the following files: