17#include "AthLinks/ElementLink.h"
29 ISvcLocator *pSvcLocator)
48 return StatusCode::SUCCESS;
58 unsigned int count = eventInfo->eventNumber() + 1;
62 auto cinfo = std::make_unique<DMTest::C>();
63 auto info_store = std::make_unique<DMTest::CInfoAuxContainer>();
64 cinfo->setStore (info_store.get());
74 cEL(*cinfo).toIndexedElement (*cvec,
count % cvec->size());
78 std::unique_ptr<const DMTest::C> cinfo_c (std::move (cinfo));
79 std::unique_ptr<const DMTest::CInfoAuxContainer> info_store_c (std::move (info_store));
80 if (cinfoH.
put (std::move(cinfo_c), std::move(info_store_c)) ==
nullptr) {
82 return StatusCode::FAILURE;
85 return StatusCode::SUCCESS;
94 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
Class used for testing xAOD data reading/writing.
Class used for testing xAOD data reading/writing.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
An algorithm that can be simultaneously executed in multiple threads.
virtual StatusCode execute(const EventContext &ctx) const override
Algorithm event processing.
virtual StatusCode initialize() override
Algorithm initialization; called at the beginning of the job.
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
xAODTestWriteCInfo(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
SG::ReadHandleKey< DMTest::CVec > m_cvecKey
SG::WriteHandleKey< DMTest::C > m_cinfoKey
virtual StatusCode finalize() override
Algorithm finalization; called at the end of the job.
SG::Accessor< T, ALLOC > Accessor
const_pointer_type put(std::unique_ptr< T > data, bool returnExisting=false) const
Record an 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 (cinfo).