20#include "AthLinks/ElementLink.h"
32 ISvcLocator *pSvcLocator)
49 return StatusCode::SUCCESS;
58 unsigned int count = ctx.eventID().event_number() + 1;
60 auto coll = std::make_unique<DMTest::CVec>();
61 auto store = std::make_unique<DMTest::CAuxContainer>();
62 coll->setStore (store.get());
70 if (
count == 5) nent = 0;
71 for (
int i=0; i < nent; i++) {
74 c.setAnInt (
count * 100 + i+1);
75 c.setAFloat (
count * 200 + (
float)i*0.1);
77 anInt2(c) =
count*300 + i+1;
78 dVar1(c) =
count*450 + i+1;
79 dVar2(c) =
count*750 + i+1;
80 cEL(c).toIndexedElement (*coll, 9-i);
84 CHECK( cvec.
record (std::move(coll), std::move(store)) );
87 for (
int i=0; i < nent; i++) {
88 dtest (*(*dtest)[i]) = i+123;
91 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
Hold information about an option setting request.
Class used for testing xAOD data reading/writing.
Class used for testing xAOD data reading/writing.
Class used for testing xAOD data reading/writing.
Helper class to provide type-safe access to aux data.
#define CHECK(...)
Evaluate an expression and check for errors.
Helper class to provide type-safe access to aux data.
Handle class for adding a decoration to an object.
An algorithm that can be simultaneously executed in multiple threads.
SG::WriteDecorHandleKey< DMTest::CVec > m_cvecDecorKey
SG::WriteHandleKey< DMTest::CVec > m_cvecKey
virtual StatusCode execute(const EventContext &ctx) const override
Algorithm event processing.
virtual StatusCode initialize() override
Algorithm initialization; called at the beginning of the job.
xAODTestWriteCVec(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Helper class to provide type-safe access to aux data.
Helper class to provide type-safe access to aux data.
Handle class for adding a decoration to an object.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
int count(std::string s, const std::string ®x)
count how many occurances of a regx are in a string
Algorithm to test writing xAOD classes with auxiliary data (cvec).