ATLAS Offline Software
Control
DataModelTest
DataModelTestDataCommon
src
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
"
13
#include "
DataModelTestDataCommon/C.h
"
14
#include "
StoreGate/WriteHandleKey.h
"
15
#include "AthLinks/DataLink.h"
16
#include "
AthContainersInterfaces/IAuxStore.h
"
17
18
19
namespace
DMTest
{
20
21
22
StatusCode
xAODTestWriteFwdLink1::initialize
()
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."
));
35
SG::WriteHandle<DMTest::CVec>
cvec_h (
m_cvecKey
, ctx);
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
DataLink
Object reference supporting deferred reading from StoreGate.
Definition:
AthLinks/DataLink.h:93
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
Generated on Sun Dec 22 2024 21:22:55 for ATLAS Offline Software by
1.8.18