|
ATLAS Offline Software
|
Go to the documentation of this file.
23 #include "AthLinks/ElementLink.h"
39 return StatusCode::SUCCESS;
48 unsigned int count = ctx.eventID().event_number() + 1;
52 auto trig_coll = std::make_unique<DMTest::CVec>();
53 auto trig_store = std::make_unique<DMTest::CTrigAuxContainer>();
54 trig_coll->setStore (trig_store.get());
64 for (
int i=0;
i < 8;
i++) {
66 C&
c = *trig_coll->back();
68 c.setAFloat (
count * 600 + (
float)
i*0.1);
74 CHECK( ctrig.
record (std::move (trig_coll), std::move (trig_store)) );
77 auto gcont = std::make_unique<DMTest::GVec>();
78 auto gstore = std::make_unique<DMTest::GAuxContainer>();
79 gcont->setStore (gstore.get());
81 for (
int i=0;
i < 10;
i++) {
83 G&
g = *gcont->back();
85 g.setgFloat (
count * 700 + 100 +
i+0.5);
86 std::vector<double>
v;
87 for (
int j=0; j<
i; j++) {
88 v.push_back (
count * 700 + 100*j +
i+0.5);
94 CHECK( gvec.
record (std::move (gcont), std::move (gstore)) );
99 return StatusCode::SUCCESS;
107 const EventContext& ctx)
const
109 auto coll = std::make_unique<DMTest::CVecWithData>();
110 auto store = std::make_unique<DMTest::CAuxContainer>();
111 coll->setStore (
store.get());
113 coll->meta1 =
count + 1000;
114 for (
int i=0;
i < 10;
i++) {
116 C&
c = *coll->back();
117 c.setAnInt (
count * 200 +
i+1);
123 return StatusCode::SUCCESS;
virtual StatusCode initialize() override
Algorithm initialization; called at the beginning of the job.
SG::WriteHandleKey< DMTest::CVec > m_ctrigKey
Helper class to provide type-safe access to aux data.
virtual StatusCode execute(const EventContext &ctx) const override
Algorithm event processing.
Class used for testing xAOD data reading/writing.
Hold information about an option setting request.
Test for xAOD auto schema evolution.
Class used for testing xAOD data reading/writing.
Helper class to provide type-safe access to aux data.
::StatusCode StatusCode
StatusCode definition for legacy code.
Class used for testing xAOD data reading/writing.
#define CHECK(...)
Evaluate an expression and check for errors.
StatusCode write_cvec_with_data(unsigned int count, const EventContext &ctx) const
Test writing container with additional data.
Helpers for checking error return status codes and reporting errors.
Test writing a container with metadata.
SG::WriteHandleKey< DMTest::CVecWithData > m_cvecWDKey
SG::ReadHandleKey< DMTest::CVec > m_cvecKey
Algorithm to test writing xAOD classes with auxiliary data.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
Test recording ViewVector w/o having CLASS_DEF visible in compilation unit.
Class used for testing xAOD data reading/writing.
Test for xAOD auto schema evolution.
SG::WriteHandleKey< DMTest::GVec > m_gvecKey