ATLAS Offline Software
Loading...
Searching...
No Matches
AllocTestReadWithoutAlloc.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
14#include <sstream>
15
16
17namespace DMTest {
18
19
24{
25 ATH_CHECK( m_containerKey.initialize() );
26 return StatusCode::SUCCESS;
27}
28
29
33StatusCode AllocTestReadWithoutAlloc::execute (const EventContext& ctx) const
34{
35 static const SG::AuxElement::Accessor<int> atInt3 ("atInt3");
36 static const SG::AuxElement::Accessor<int> atInt4 ("atInt4");
37
38 // Write to a sstream first, to avpod having the output broken up by
39 // schema evolution messges.
40 std::ostringstream ss;
41
43 ss << m_containerKey.key() << " ";
44 for (const AllocTest* at : *cont) {
45 ss << at->atInt1() << " " << at->atInt2() << " "
46 << atInt3(*at) << " " << atInt4(*at) << " ";
47 }
48 std::cout << ss.str() << "\n";
49 return StatusCode::SUCCESS;
50}
51
52
53} // 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.
SG::Accessor< T, ALLOC > Accessor
Definition AuxElement.h:572
Definition B.h:23