ATLAS Offline Software
Loading...
Searching...
No Matches
xAODTestWriteSymlinks.cxx
Go to the documentation of this file.
1/*
2 * Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration.
3 */
4// $Id$
11
12
16
17
18namespace DMTest {
19
20
27 ISvcLocator *pSvcLocator)
28 : AthReentrantAlgorithm (name, pSvcLocator)
29{
30 declareProperty ("S2Key", m_s2Key = "S2");
31 declareProperty ("S1Key", m_s1Key = "S2");
32 declareProperty ("AliasKey", m_aliasKey = "S2alias");
33}
34
35
40{
41 m_s1Key = m_s2Key.key();
42
43 ATH_CHECK( m_s2Key.initialize() );
44 ATH_CHECK( m_s1Key.initialize() );
45 ATH_CHECK( m_aliasKey.initialize() );
46 return StatusCode::SUCCESS;
47}
48
49
53StatusCode xAODTestWriteSymlinks::execute (const EventContext& ctx) const
54{
56 unsigned int eventNumber = ctx.eventID().event_number();
57 ATH_CHECK( s2.record (std::make_unique<DMTest::S2> (eventNumber*100)) );
58 ATH_CHECK( s2.alias (m_aliasKey) );
59 ATH_CHECK( s2.symLink (m_s1Key) );
60 return StatusCode::SUCCESS;
61}
62
63
64} // namespace DMTest
65
#define ATH_CHECK
Evaluate an expression and check for errors.
Handle class for reading from StoreGate.
Handle class for recording to StoreGate.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
An algorithm that can be simultaneously executed in multiple threads.
Definition B.h:23