35 return StatusCode::SUCCESS;
45 std::ostringstream ost1;
47 for (
const H*
h : *hvec)
48 ost1 <<
" " <<
h->aFloat();
53 std::ostringstream ost2;
55 for (
const H*
h : *hview)
56 ost2 <<
" " <<
h->aFloat();
61 auto vecnew = std::make_unique<HVec>();
62 auto store = std::make_unique<HAuxContainer>();
63 vecnew->setStore (store.get());
64 for (
size_t i = 0; i < hview->
size(); i++) {
65 vecnew->push_back (
new H);
66 *vecnew->back() = *(*hview)[i];
69 auto viewnew = std::make_unique<HView>();
70 for (
size_t i = 0; i < vecnew->size(); i++)
71 viewnew->push_back (vecnew->at(vecnew->size()-1-i));
80 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
Test for xAOD schema evolution.
Test for xAOD schema evolution.
Handle class for reading from StoreGate.
Handle class for recording to StoreGate.
Header file for AthHistogramAlgorithm.
SG::ReadHandleKey< DMTest::HVec > m_hviewKey
virtual StatusCode initialize() override
Algorithm initialization; called at the beginning of the job.
SG::ReadHandleKey< DMTest::HVec > m_hvecKey
SG::WriteHandleKey< DMTest::HView > m_viewWriteKey
virtual StatusCode execute(const EventContext &ctx) const override
Algorithm event processing.
SG::WriteHandleKey< DMTest::HVec > m_vecWriteKey
size_type size() const noexcept
Returns the number of elements in the collection.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
Algorithm to test reading xAOD data with schema evolution (HVec/HView)