30 return StatusCode::SUCCESS;
39 unsigned int count = ctx.eventID().event_number() + 1;
41 auto hvec = std::make_unique<DMTest::HVec>();
42 auto store = std::make_unique<DMTest::HAuxContainer>();
43 hvec->setStore (store.get());
45 for (
int i = 0; i < 20; i++) {
47 hvec->back()->setAnInt (i+1 +
count * 400);
50 std::unique_ptr<DMTest::HView> hview;
52 hview = std::make_unique<DMTest::HView>();
53 for (
int i = 0; i < 20; i++) {
54 hview->push_back (hvec->at (19-i));
66 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
Test for xAOD schema evolution.
Test for xAOD schema evolution.
SG::WriteHandleKey< DMTest::HVec > m_hvecKey
SG::WriteHandleKey< DMTest::HView > m_hviewKey
virtual StatusCode initialize() override
Algorithm initialization; called at the beginning of the job.
virtual StatusCode execute(const EventContext &ctx) const override
Algorithm event processing.
int count(std::string s, const std::string ®x)
count how many occurances of a regx are in a string
StatusCode recordView2(SG::WriteHandle< ViewVector< DMTest::HVec > > &h, std::unique_ptr< ViewVector< DMTest::HVec > > view)
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Algorithm to test writing xAOD classes for schema evolution (hvec/hview).
Test recording ViewVector w/o having CLASS_DEF visible in compilation unit.