43 return StatusCode::SUCCESS;
63 std::vector<std::string> names;
69 names.push_back (
r.getName(auxid));
71 std::ostringstream ost1;
72 ost1 <<
"ctrig aux items: ";
73 for (
const std::string& n : names)
77 for (
const C* c : *ctrig) {
78 std::ostringstream ost;
79 ost <<
" anInt1 " << c->anInt()
80 <<
" aFloat: " << c->aFloat()
81 <<
" anInt2: " << anInt2(*c)
82 <<
" dInt1: " << dInt1(*c);
84 ost <<
" dInt100: " << dInt100(*c);
86 ost <<
" dInt150: " << dInt150(*c);
88 ost <<
" dInt200: " << dInt200(*c);
90 ost <<
" anInt10: " << anInt10(*c);
95 auto ctrignew = std::make_unique<CVec>();
96 auto trig_store = std::make_unique<CTrigAuxContainer>();
97 ctrignew->setStore (trig_store.get());
98 for (
size_t i = 0; i < ctrig->size(); i++) {
99 ctrignew->push_back (
new C);
100 *ctrignew->back() = *(*ctrig)[i];
104 std::move(trig_store)) );
114 return StatusCode::SUCCESS;
126 std::ostringstream ost;
128 for (
const C* c : *
vec) {
129 ost <<
" " << c->anInt();
131 ost <<
"(" << anInt10(*c) <<
")";
136 auto vecnew = std::make_unique<CVecWithData>();
137 auto store = std::make_unique<CAuxContainer>();
138 vecnew->setStore (store.get());
139 for (
size_t i = 0; i <
vec->size(); i++) {
140 vecnew->push_back (
new C);
141 *vecnew->back() = *(*vec)[i];
148 return StatusCode::SUCCESS;
160 std::vector<std::string> names;
162 names.push_back (
r.getName(auxid));
164 std::ostringstream ost3;
165 ost3 <<
"gvec aux items: ";
166 for (
const std::string& n : names)
169 for (
const G* g : *gvec) {
170 ost3 <<
" anInt " << g->anInt();
171 ost3 <<
" gFloat " << g->gFloat();
173 for (
float f : g->gvFloat())
180 auto gvecnew = std::make_unique<GVec>();
181 auto gstore = std::make_unique<GAuxContainer>();
182 gvecnew->setStore (gstore.get());
183 for (
size_t i = 0; i < gvec->size(); i++) {
184 gvecnew->push_back (
new G);
185 *gvecnew->back() = *(*gvec)[i];
189 std::move(gstore)) );
192 return StatusCode::SUCCESS;
200StatusCode xAODTestRead::read_cview()
const
203 ATH_MSG_INFO(
"(No " << m_readPrefix <<
"cview view container.)" );
204 return StatusCode::SUCCESS;
207 const CView* cview =
nullptr;
209 CHECK(
evtStore()->retrieve (cview, m_readPrefix +
"cview") );
210 std::ostringstream ost;
211 ost << m_readPrefix <<
"cview:";
212 for (
const C* c : *cview) {
213 ost <<
" " << c->anInt();
214 if (anInt10.isAvailable(*c))
215 ost <<
"(" << anInt10(*c) <<
")";
219 if (!m_writePrefix.empty()) {
222 m_writePrefix +
"cview", LOCKED));
225 return StatusCode::SUCCESS;
235 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
Handle mappings between names and auxid_t.
Class used for testing xAOD data reading/writing.
Class used for testing xAOD data reading/writing.
Test writing a container with metadata.
Class used for testing xAOD data reading/writing.
Class used for testing xAOD data reading/writing.
std::vector< size_t > vec
Helpers for checking error return status codes and reporting errors.
#define CHECK(...)
Evaluate an expression and check for errors.
Test for xAOD auto schema evolution.
Test for xAOD auto schema evolution.
Handle class for reading from StoreGate.
Handle class for recording to StoreGate.
ServiceHandle< StoreGateSvc > & evtStore()
StatusCode read_cvec_with_data(const EventContext &ctx) const
Test reading container with additional data.
SG::WriteHandleKey< DMTest::CVec > m_ctrigWriteKey
SG::WriteHandleKey< DMTest::GVec > m_gvecWriteKey
SG::ReadHandleKey< DMTest::GVec > m_gvecReadKey
virtual StatusCode finalize() override
Algorithm finalization; called at the end of the job.
SG::WriteHandleKey< DMTest::CVecWithData > m_cvecWDWriteKey
StatusCode read_gvec(const EventContext &ctx) const
Test reading GVec object.
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< DMTest::CVecWithData > m_cvecWDReadKey
SG::ReadHandleKey< DMTest::CVec > m_ctrigReadKey
Test reading view container.
SG::Accessor< T, ALLOC > Accessor
Handle mappings between names and auxid_t.
static AuxTypeRegistry & instance()
Return the singleton registry instance.
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
bool contains(const std::string &s, const std::string ®x)
does a string contain the substring
size_t auxid_t
Identifier for a particular aux data item.
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
Algorithm to test reading xAOD data.