ATLAS Offline Software
xAODTestWriteFwdLink1.cxx
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration.
3  */
12 #include "xAODTestWriteFwdLink1.h"
15 #include "AthLinks/DataLink.h"
17 
18 
19 namespace DMTest {
20 
21 
23 {
24  ATH_CHECK( m_cvecKey.initialize() );
25  return StatusCode::SUCCESS;
26 }
27 
28 
29 StatusCode xAODTestWriteFwdLink1::execute (const EventContext& ctx) const
30 {
31  auto cvec = std::make_unique<DMTest::CVec>();
32  for (size_t i = 0; i < 10; i++)
33  cvec->push_back (std::make_unique<DMTest::C>());
34  cvec->setStore (DataLink<SG::IAuxStore> (m_cvecKey.key() + "Aux."));
36  ATH_CHECK (cvec_h.record (std::move (cvec)));
37  return StatusCode::SUCCESS;
38 }
39 
40 
41 } // namespace DMTest
42 
DMTest::xAODTestWriteFwdLink1::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition: xAODTestWriteFwdLink1.cxx:29
DMTest::xAODTestWriteFwdLink1::m_cvecKey
SG::WriteHandleKey< DMTest::CVec > m_cvecKey
Definition: xAODTestWriteFwdLink1.h:37
lumiFormat.i
int i
Definition: lumiFormat.py:85
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
C.h
Class used for testing xAOD data reading/writing.
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
DMTest::xAODTestWriteFwdLink1::initialize
virtual StatusCode initialize() override
Definition: xAODTestWriteFwdLink1.cxx:22
SG::WriteHandle::record
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
IAuxStore.h
Interface for non-const operations on an auxiliary store.
xAODTestWriteFwdLink1.h
DMTest
Definition: B.h:23