ATLAS Offline Software
Loading...
Searching...
No Matches
AllocTestReadWithoutAlloc.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
14#include <print>
15#include <sstream>
16
17
18namespace DMTest {
19
20
25{
26 ATH_CHECK( m_containerKey.initialize() );
27 return StatusCode::SUCCESS;
28}
29
30
34StatusCode AllocTestReadWithoutAlloc::execute (const EventContext& ctx) const
35{
36 static const SG::Accessor<int> atInt3 ("atInt3");
37 static const SG::Accessor<int> atInt4 ("atInt4");
38
39 // Write to a sstream first, to avpod having the output broken up by
40 // schema evolution messges.
41 std::ostringstream ss;
42
44 std::print (ss, "{} ", m_containerKey.key());
45 for (const AllocTest* at : *cont) {
46 std::print (ss, "{} {} {} {} ",
47 at->atInt1(), at->atInt2(), atInt3(*at), atInt4(*at));
48 }
49 std::println ("{}", ss.str());
50 return StatusCode::SUCCESS;
51}
52
53
54} // namespace DMTest
Test reading AllocTest with a non-default allocator.
#define ATH_CHECK
Evaluate an expression and check for errors.
Testing an xAOD object with a non-standard memory allocator.
static Double_t ss
virtual StatusCode initialize() override
Gaudi initialize method.
SG::ReadHandleKey< AllocTestContainer > m_containerKey
virtual StatusCode execute(const EventContext &ctx) const override
Algorithm event processing.
Helper class to provide type-safe access to aux data.
Definition B.h:23