ATLAS Offline Software
Control
DataModelTest
DataModelTestDataRead
src
AllocTestReadWithAlloc.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 "
AllocTestReadWithAlloc.h
"
13
#include "
DataModelTestDataRead/AllocTestAuxContainer.h
"
14
#include <sstream>
15
16
17
namespace
DMTest
{
18
19
23
StatusCode
AllocTestReadWithAlloc::initialize
()
24
{
25
ATH_CHECK
(
m_containerKey
.initialize() );
26
return
StatusCode::SUCCESS;
27
}
28
29
33
StatusCode
AllocTestReadWithAlloc::execute
(
const
EventContext& ctx)
const
34
{
35
static
const
SG::AuxElement::Accessor<int, std::pmr::polymorphic_allocator<int>
>
36
atInt3 (
"atInt3"
);
37
static
const
SG::AuxElement::Accessor<int, Athena_test::TestAlloc<int>
>
38
atInt4 (
"atInt4"
);
39
40
// Write to a sstream first, to avpod having the output broken up by
41
// schema evolution messges.
42
std::ostringstream
ss
;
43
44
SG::ReadHandle<AllocTestContainer>
cont (
m_containerKey
, ctx);
45
ss
<<
m_containerKey
.key() <<
" "
;
46
for
(
const
AllocTest
* at : *cont) {
47
ss
<< at->atInt1() <<
" "
<< at->atInt2() <<
" "
48
<< atInt3(*at) <<
" "
<< atInt4(*at) <<
" "
;
49
}
50
std::cout <<
ss
.str() <<
"\n"
;
51
return
StatusCode::SUCCESS;
52
}
53
54
55
}
// namespace DMTest
DMTest::AllocTest_v1
Testing an xAOD object with a non-standard memory allocator.
Definition:
DataModelTestDataRead/DataModelTestDataRead/versions/AllocTest_v1.h:32
PowhegControl_ttHplus_NLO.ss
ss
Definition:
PowhegControl_ttHplus_NLO.py:83
DMTest::AllocTestReadWithAlloc::execute
virtual StatusCode execute(const EventContext &ctx) const override
Algorithm event processing.
Definition:
AllocTestReadWithAlloc.cxx:33
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:70
AllocTestReadWithAlloc.h
Test reading AllocTest with a non-default allocator.
AllocTestAuxContainer.h
Testing an xAOD object with a non-standard memory allocator.
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition:
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_CHECK
#define ATH_CHECK
Definition:
AthCheckMacros.h:40
DMTest::AllocTestReadWithAlloc::m_containerKey
SG::ReadHandleKey< AllocTestContainer > m_containerKey
Definition:
AllocTestReadWithAlloc.h:53
DMTest::AllocTestReadWithAlloc::initialize
virtual StatusCode initialize() override
Gaudi initialize method.
Definition:
AllocTestReadWithAlloc.cxx:23
DMTest
Definition:
B.h:23
Generated on Thu Nov 7 2024 21:09:55 for ATLAS Offline Software by
1.8.18