ATLAS Offline Software
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$
15 #include "StoreGate/ReadHandle.h"
16 
17 
18 namespace 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 {
39  return StatusCode::SUCCESS;
40 }
41 
42 
43 StatusCode 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
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
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:67
xAODTestReadSymlinkTool.h
Test reading via a symlink, as a tool.
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
COOLRates.alias
alias
Definition: COOLRates.py:1172
DMTest::xAODTestReadSymlinkTool::m_aliasKey
SG::ReadHandleKey< DMTest::S2 > m_aliasKey
Definition: xAODTestReadSymlinkTool.h:63
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
DMTest::xAODTestReadSymlinkTool::m_s1Key
SG::ReadHandleKey< DMTest::S1 > m_s1Key
Definition: xAODTestReadSymlinkTool.h:61
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
DMTest::xAODTestReadSymlinkTool::initialize
virtual StatusCode initialize() override
Tool initialization; called at the beginning of the job.
Definition: xAODTestReadSymlinkTool.cxx:33
DMTest::xAODTestReadSymlinkTool::m_s2Key
SG::ReadHandleKey< DMTest::S2 > m_s2Key
Definition: xAODTestReadSymlinkTool.h:62
DMTest::xAODTestReadSymlinkTool::doit
virtual StatusCode doit(const EventContext &ctx) const override
Tool event processing.
Definition: xAODTestReadSymlinkTool.cxx:43
ReadCellNoiseFromCoolCompare.s2
s2
Definition: ReadCellNoiseFromCoolCompare.py:379
DMTest::xAODTestReadSymlinkTool::xAODTestReadSymlinkTool
xAODTestReadSymlinkTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor.
Definition: xAODTestReadSymlinkTool.cxx:21
ReadHandle.h
Handle class for reading from StoreGate.
python.compressB64.c
def c
Definition: compressB64.py:93
DMTest::xAODTestReadSymlinkTool::m_objKey
SG::ReadHandleKey< SG::AuxElement > m_objKey
Definition: xAODTestReadSymlinkTool.h:59
DMTest
Definition: B.h:23