ATLAS Offline Software
Loading...
Searching...
No Matches
xAODTestWriteFwdLink1.cxx
Go to the documentation of this file.
1/*
2 * Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration.
3 */
10
11
15#include "AthLinks/DataLink.h"
17
18
19namespace DMTest {
20
21
23{
24 ATH_CHECK( m_cvecKey.initialize() );
25 return StatusCode::SUCCESS;
26}
27
28
29StatusCode 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
#define ATH_CHECK
Evaluate an expression and check for errors.
Class used for testing xAOD data reading/writing.
Interface for non-const operations on an auxiliary store.
Property holding a SG store/key/clid from which a WriteHandle is made.
virtual StatusCode initialize() override
virtual StatusCode execute(const EventContext &ctx) const override
SG::WriteHandleKey< DMTest::CVec > m_cvecKey
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
Definition B.h:23