ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
DataModelTest
DataModelTestDataRead
src
AllocTestReadWithAlloc.cxx
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration.
3
*/
10
11
12
#include "
AllocTestReadWithAlloc.h
"
13
#include "
DataModelTestDataRead/AllocTestAuxContainer.h
"
14
#include <print>
15
#include <sstream>
16
17
18
namespace
DMTest
{
19
20
24
StatusCode
AllocTestReadWithAlloc::initialize
()
25
{
26
ATH_CHECK
(
m_containerKey
.initialize() );
27
return
StatusCode::SUCCESS;
28
}
29
30
34
StatusCode
AllocTestReadWithAlloc::execute
(
const
EventContext& ctx)
const
35
{
36
static
const
SG::Accessor<int, std::pmr::polymorphic_allocator<int>
>
37
atInt3 (
"atInt3"
);
38
static
const
SG::Accessor<int, Athena_test::TestAlloc<int>
>
39
atInt4 (
"atInt4"
);
40
41
// Write to a sstream first, to avoid having the output broken up by
42
// schema evolution messges.
43
std::ostringstream
ss
;
44
45
SG::ReadHandle<AllocTestContainer>
cont (
m_containerKey
, ctx);
46
std::print (
ss
,
"{} "
,
m_containerKey
.key());
47
for
(
const
AllocTest
* at : *cont) {
48
std::print (
ss
,
"{} {} {} {} "
,
49
at->atInt1(), at->atInt2(), atInt3(*at), atInt4(*at));
50
}
51
std::println (
"{}"
,
ss
.str());
52
return
StatusCode::SUCCESS;
53
}
54
55
56
}
// namespace DMTest
AllocTestReadWithAlloc.h
Test reading AllocTest with a non-default allocator.
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
AllocTestAuxContainer.h
Testing an xAOD object with a non-standard memory allocator.
ss
static Double_t ss
Definition
LArPhysWaveHECTool.cxx:37
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:24
DMTest::AllocTestReadWithAlloc::execute
virtual StatusCode execute(const EventContext &ctx) const override
Algorithm event processing.
Definition
AllocTestReadWithAlloc.cxx:34
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:66
DMTest
Definition
B.h:23
DMTest::AllocTest
AllocTest_v1 AllocTest
Definition
DataModelTestDataRead/DataModelTestDataRead/AllocTest.h:23
Generated on
for ATLAS Offline Software by
1.17.0