![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
29 #include "AthLinks/ElementLink.h"
33 #define CHECK_OPTION(ret) \
36 ATH_MSG_ERROR("setOption failed"); \
37 return StatusCode::FAILURE; \
51 ISvcLocator *pSvcLocator)
70 return StatusCode::SUCCESS;
79 unsigned int count = ctx.eventID().event_number() + 1;
83 auto trig_coll = std::make_unique<DMTest::CVec>();
84 auto trig_store = std::make_unique<DMTest::CTrigAuxContainer>();
85 trig_coll->setStore (trig_store.get());
95 for (
int i=0;
i < 8;
i++) {
97 C&
c = *trig_coll->back();
99 c.setAFloat (
count * 600 + (
float)
i*0.1);
105 CHECK( ctrig.
record (std::move (trig_coll), std::move (trig_store)) );
107 auto gcont = std::make_unique<DMTest::GVec>();
108 auto gstore = std::make_unique<DMTest::GAuxContainer>();
109 gcont->setStore (gstore.get());
111 for (
int i=0;
i < 10;
i++) {
113 G&
g = *gcont->back();
114 g.setAnInt (
count * 700 +
i+1);
115 g.setgFloat (
count * 700 + 100 +
i+0.5);
116 std::vector<double>
v;
117 for (
int j=0; j<
i; j++) {
118 v.push_back (
count * 700 + 100*j +
i+0.5);
124 CHECK( gvec.
record (std::move (gcont), std::move (gstore)) );
128 return StatusCode::SUCCESS;
136 const EventContext& ctx)
const
138 auto coll = std::make_unique<DMTest::CVecWithData>();
139 auto store = std::make_unique<DMTest::CAuxContainer>();
140 coll->setStore (
store.get());
142 coll->meta1 =
count + 1000;
143 for (
int i=0;
i < 10;
i++) {
145 C&
c = *coll->back();
146 c.setAnInt (
count * 200 +
i+1);
152 return StatusCode::SUCCESS;
162 auto hvec = std::make_unique<DMTest::HVec>();
163 auto store = std::make_unique<DMTest::HAuxContainer>();
164 hvec->setStore (
store.get());
165 auto hview = std::make_unique<DMTest::HView>();
167 for (
int i = 0;
i < 20;
i++) {
169 hvec->back()->setAnInt (
i+1 +
count * 400);
172 for (
int i = 0;
i < 20;
i++) {
173 hview->push_back (hvec->at (19-
i));
180 return StatusCode::SUCCESS;
190 return StatusCode::SUCCESS;
xAODTestWrite(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
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.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
virtual StatusCode finalize() override
Algorithm finalization; called at the end of the job.
Class used for testing xAOD data reading/writing.
Hold information about an option setting request.
An algorithm that can be simultaneously executed in multiple threads.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
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
StatusCode recordView2(SG::WriteHandle< ViewVector< DMTest::HVec > > &h, std::unique_ptr< ViewVector< DMTest::HVec > > view)
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