ATLAS Offline Software
Loading...
Searching...
No Matches
PhysliteTestXaodArray.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7
8//
9// includes
10//
11
13
21
29
30#include <AsgTesting/UnitTest.h>
33
34#include <boost/core/demangle.hpp>
35#include <format>
36#include <gtest/gtest.h>
37
38//
39// method implementations
40//
41
42namespace columnar
43{
44 namespace TestUtils
45 {
46 namespace
47 {
48 struct IColumnReaderXA;
49
50 struct ColumnDataXA
51 {
52 ColumnInfo info;
53 std::shared_ptr<TestUtils::IColumnReaderXA> reader;
54 };
55
56 struct IColumnReaderXA
57 {
58 virtual ~IColumnReaderXA () = default;
59
60 virtual void connect (ColumnDataXA& /*columnData*/, std::unordered_map<std::string,ColumnDataXA>& /*requestedColumns*/) {}
61
62 virtual void requestShallowCopy () {
63 throw std::runtime_error ("shallow copy not supported for column reader");
64 }
65
66 virtual StatusCode retrieveContainer (xAOD::TEvent& /*event*/, xAOD::TStore& /*store*/, ColumnVectorData& /*columnData*/) { return StatusCode::SUCCESS; };
67
68 virtual std::pair<const SG::AuxElement*,std::size_t> getObject () const {
69 throw std::runtime_error ("getObject not implemented for this XAOD column reader"); }
70
71 virtual void retrieveAuxData (ColumnVectorData& /*columnData*/) {}
72
73 [[nodiscard]] virtual BranchPerfData getPerfData (float /*emptyTime*/) = 0;
74 };
75
76 struct ColumnDataXAEventInfo final : public IColumnReaderXA, asg::AsgMessaging
77 {
78 std::string m_name {eventRangeColumnName};
79 unsigned index = 0;
80 std::array<ColumnarOffsetType, 2> data = {0, 1};
81 const xAOD::EventInfo* eventInfo = nullptr;
82 Benchmark benchmarkFirstRetrieve;
83 Benchmark benchmarkSecondRetrieve;
84
85 ColumnDataXAEventInfo (const ColumnInfo& info)
86 : AsgMessaging ("ColumnDataXAEventInfo"), index (info.index)
87 {}
88
89 virtual StatusCode retrieveContainer (xAOD::TEvent& event, xAOD::TStore& /*store*/, ColumnVectorData& columnData) override
90 {
91 benchmarkFirstRetrieve.startTimer ();
92 ATH_CHECK (event.retrieve (eventInfo, "EventInfo"));
93 benchmarkFirstRetrieve.stopTimer ();
94 benchmarkSecondRetrieve.startTimer ();
95 ATH_CHECK (event.retrieve (eventInfo, "EventInfo"));
96 benchmarkSecondRetrieve.stopTimer ();
97 columnData.setColumn (index, data.size(), data.data());
98 return StatusCode::SUCCESS;
99 }
100
101 virtual std::pair<const SG::AuxElement*,std::size_t> getObject () const override
102 {
103 return {eventInfo, 1};
104 }
105
106 [[nodiscard]] virtual BranchPerfData getPerfData (float emptyTime) override
107 {
108 BranchPerfData result;
109 result.name = "EventInfo";
110 result.timeRead = benchmarkFirstRetrieve.getEntryTime(emptyTime);
111 result.timeReadAgain = benchmarkSecondRetrieve.getEntryTime(emptyTime);
112 benchmarkFirstRetrieve.setSilence();
113 benchmarkSecondRetrieve.setSilence();
114 return result;
115 }
116 };
117
118 template<typename XAODObjectType>
119 struct ColumnDataXARetrieve final : public IColumnReaderXA, asg::AsgMessaging
120 {
121 std::string containerName;
122 unsigned index = 0;
123 bool shallowCopy = false;
124 bool skipShallowCopies = false;
125 std::array<ColumnarOffsetType, 2> data = {0, 1};
126 const XAODObjectType* object = nullptr;
127 Benchmark benchmarkFirstRetrieve;
128 Benchmark benchmarkSecondRetrieve;
129 Benchmark benchmarkShallowCopy;
130 Benchmark benchmarkShallowRegister;
131
132 ColumnDataXARetrieve (const ColumnInfo& info, const UserConfiguration& userConfiguration)
133 : AsgMessaging ("ColumnDataXARetrieve_" + info.name), containerName (info.name), index (info.index), skipShallowCopies (userConfiguration.skipShallowCopies)
134 {}
135
136 virtual void requestShallowCopy() override {
137 if (!skipShallowCopies)
138 shallowCopy = true;
139 }
140
141 virtual StatusCode retrieveContainer (xAOD::TEvent& event, xAOD::TStore& store, ColumnVectorData& columnData) override
142 {
143 benchmarkFirstRetrieve.startTimer ();
144 ATH_CHECK (event.retrieve (object, containerName));
145 benchmarkFirstRetrieve.stopTimer ();
146 benchmarkSecondRetrieve.startTimer ();
147 ATH_CHECK (event.retrieve (object, containerName));
148 benchmarkSecondRetrieve.stopTimer ();
149 if (!object)
150 throw std::logic_error ("no object retrieved for XAOD container (in retrieveContainer): " + containerName);
151 data[1] = object->size();
152 columnData.setColumn (index, data.size(), data.data());
153 if (shallowCopy)
154 {
155 std::string shallowName = containerName + "_shallowCopy";
156 std::string shallowAuxName = shallowName + "Aux.";
157 benchmarkShallowCopy.startTimer ();
158 auto shallowCopy = xAOD::shallowCopy (*object);
159 benchmarkShallowCopy.stopTimer ();
160 benchmarkShallowRegister.startTimer ();
161 object = shallowCopy.first.get();
162 ATH_CHECK (store.record (std::move(shallowCopy.first), shallowName));
163 ATH_CHECK (store.record (std::move(shallowCopy.second), shallowAuxName));
164 benchmarkShallowRegister.stopTimer ();
165 }
166 return StatusCode::SUCCESS;
167 }
168
169 virtual std::pair<const SG::AuxElement*,std::size_t> getObject () const override
170 {
171 if (!object)
172 throw std::logic_error ("no object retrieved for XAOD container: " + containerName);
173 if (object->size() == 0)
174 return {nullptr, 0};
175 return {(*object)[0], object->size()};
176 }
177
178 [[nodiscard]] virtual BranchPerfData getPerfData (float emptyTime) override
179 {
180 BranchPerfData result;
181 result.name = containerName;
182 result.timeRead = benchmarkFirstRetrieve.getEntryTime(emptyTime);
183 result.timeReadAgain = benchmarkSecondRetrieve.getEntryTime(emptyTime);
184 if (shallowCopy)
185 {
186 result.timeShallowCopy = benchmarkShallowCopy.getEntryTime(emptyTime);
187 result.timeShallowRegister = benchmarkShallowRegister.getEntryTime(emptyTime);
188 }
189 benchmarkFirstRetrieve.setSilence();
190 benchmarkSecondRetrieve.setSilence();
191 benchmarkShallowCopy.setSilence();
192 benchmarkShallowRegister.setSilence();
193 return result;
194 }
195 };
196
197 template<typename T>
198 struct ColumnDataXAAccessor final : public IColumnReaderXA
199 {
200 std::string m_name;
201 unsigned index = 0;
202 std::optional<SG::AuxElement::Accessor<T>> accessor;
203 std::optional<SG::AuxElement::Decorator<T>> decorator;
204 bool isOptional = false;
205 bool measureNonAccessForEmpty = false;
206 const IColumnReaderXA *objectReader = nullptr;
207 Benchmark benchmarkFirstRetrieve;
208 Benchmark benchmarkSecondRetrieve;
209
210 ColumnDataXAAccessor (const ColumnInfo& info, const UserConfiguration& userConfiguration)
211 : m_name (info.name), index (info.index), measureNonAccessForEmpty (userConfiguration.measureNonAccessForEmpty)
212 {
213 auto name = info.name;
214 if (!info.replacesColumn.empty())
215 name = info.replacesColumn;
216 name = name.substr (name.find_last_of('.') + 1);
217 if (info.accessMode == ColumnAccessMode::input)
218 {
219 accessor.emplace (name);
220 isOptional = info.isOptional;
221 } else if (info.accessMode == ColumnAccessMode::output)
222 {
223 decorator.emplace (name);
224 } else
225 {
226 throw std::runtime_error ("unsupported access mode for XAOD accessor: " + info.name);
227 }
228 }
229
230 virtual void connect (ColumnDataXA& columnData, std::unordered_map<std::string,ColumnDataXA>& requestedColumns) override
231 {
232 auto iter = requestedColumns.find (columnData.info.offsetName);
233 if (iter == requestedColumns.end())
234 throw std::runtime_error ("missing offset column for XAOD accessor: " + columnData.info.offsetName);
235 objectReader = iter->second.reader.get();
236 if (decorator.has_value())
237 iter->second.reader->requestShallowCopy();
238 }
239
240 virtual void retrieveAuxData (ColumnVectorData& columnData) override
241 {
242 if (!objectReader)
243 throw std::logic_error ("no object reader for XAOD accessor");
244 auto [object, size] = objectReader->getObject();
245 if (object == nullptr)
246 {
247 if (measureNonAccessForEmpty)
248 {
249 benchmarkFirstRetrieve.startTimer ();
250 benchmarkFirstRetrieve.stopTimer ();
251 benchmarkSecondRetrieve.startTimer ();
252 benchmarkSecondRetrieve.stopTimer ();
253 }
254 if (accessor.has_value())
255 columnData.setColumn (index, 0, static_cast<const T*>(nullptr));
256 else if (decorator.has_value())
257 columnData.setColumn (index, 0, static_cast<T*>(nullptr));
258 else
259 throw std::logic_error ("no accessor or decorator for XAOD accessor");
260 } else if (accessor.has_value())
261 {
262 if (!isOptional)
263 {
264 const T *value = nullptr;
265 benchmarkFirstRetrieve.startTimer ();
266 (*accessor) (*object);
267 benchmarkFirstRetrieve.stopTimer ();
268 benchmarkSecondRetrieve.startTimer ();
269 value = &(*accessor) (*object);
270 benchmarkSecondRetrieve.stopTimer ();
271 columnData.setColumn (index, size, value);
272 } else
273 {
274 const T *value = nullptr;
275 benchmarkFirstRetrieve.startTimer ();
276 if (accessor->isAvailable (*object))
277 (*accessor) (*object);
278 benchmarkFirstRetrieve.stopTimer ();
279 benchmarkSecondRetrieve.startTimer ();
280 if (accessor->isAvailable (*object))
281 value = &(*accessor) (*object);
282 benchmarkSecondRetrieve.stopTimer ();
283 if (accessor->isAvailable (*object))
284 columnData.setColumn (index, size, value);
285 }
286 } else if (decorator.has_value())
287 {
288 T *value = nullptr;
289 benchmarkFirstRetrieve.startTimer ();
290 (*decorator) (*object);
291 benchmarkFirstRetrieve.stopTimer ();
292 benchmarkSecondRetrieve.startTimer ();
293 value = &(*decorator) (*object);
294 benchmarkSecondRetrieve.stopTimer ();
295 columnData.setColumn (index, size, value);
296 } else
297 {
298 throw std::logic_error ("no accessor or decorator for XAOD accessor");
299 }
300 }
301
302 [[nodiscard]] virtual BranchPerfData getPerfData (float emptyTime) override
303 {
304 BranchPerfData result;
305 result.name = m_name;
306 result.timeRead = benchmarkFirstRetrieve.getEntryTime(emptyTime);
307 result.timeReadAgain = benchmarkSecondRetrieve.getEntryTime(emptyTime);
308 benchmarkFirstRetrieve.setSilence();
309 benchmarkSecondRetrieve.setSilence();
310 return result;
311 }
312 };
313 }
314
315
316
317 void runXaodArrayTest (const UserConfiguration& userConfiguration, const TestDefinition& testDefinition, TFile *file)
318 {
319 using namespace asg::msgUserCode;
320
321 xAOD::TEvent event;
322 xAOD::TStore store;
323 ANA_CHECK_THROW (event.readFrom (file));
324
325 auto *myTool = dynamic_cast<ColumnarTool<ColumnarModeXAODArray>*>(testDefinition.tool);
326 if (!myTool)
327 throw std::runtime_error ("tool is not a ColumnarTool<ColumnarModeXAODArray>");
328 if (!testDefinition.containerRenames.empty())
329 renameContainers (*myTool, testDefinition.containerRenames);
330 ColumnVectorHeader columnHeader;
331 ToolColumnVectorMap toolWrapper (columnHeader, *myTool);
332
333 std::unordered_map<std::string,TestUtils::ColumnDataXA> requestedColumns;
334 for (auto& column : myTool->getColumnInfo())
335 requestedColumns[column.name].info = std::move (column);
336 for (auto& [name, data] : requestedColumns)
337 {
338 if (data.info.isOffset)
339 {
340 if (*data.info.type != typeid(ColumnarOffsetType))
341 throw std::runtime_error ("unexpected type for offset column: " + name + " " + data.info.type->name());
342 if (name == eventRangeColumnName)
343 {
344 data.reader = std::make_shared<TestUtils::ColumnDataXAEventInfo> (data.info);
345 } else if (data.info.offsetName == eventRangeColumnName)
346 {
347 if (name == "AnalysisMuons")
348 data.reader = std::make_shared<TestUtils::ColumnDataXARetrieve<xAOD::MuonContainer>> (data.info, userConfiguration);
349 else if (name == "AnalysisElectrons")
350 data.reader = std::make_shared<TestUtils::ColumnDataXARetrieve<xAOD::ElectronContainer>> (data.info, userConfiguration);
351 else if (name == "AnalysisPhotons")
352 data.reader = std::make_shared<TestUtils::ColumnDataXARetrieve<xAOD::PhotonContainer>> (data.info, userConfiguration);
353 else if (name == "egammaClusters")
354 data.reader = std::make_shared<TestUtils::ColumnDataXARetrieve<xAOD::CaloClusterContainer>> (data.info, userConfiguration);
355 else if (name == "GSFTrackParticles")
356 data.reader = std::make_shared<TestUtils::ColumnDataXARetrieve<xAOD::TrackParticleContainer>> (data.info, userConfiguration);
357 else if (name == "GSFConversionVertices")
358 data.reader = std::make_shared<TestUtils::ColumnDataXARetrieve<xAOD::VertexContainer>> (data.info, userConfiguration);
359 }
360 } else
361 {
362 if (*data.info.type == typeid(float))
363 data.reader = std::make_shared<TestUtils::ColumnDataXAAccessor<float>> (data.info, userConfiguration);
364 else if (*data.info.type == typeid(double))
365 data.reader = std::make_shared<TestUtils::ColumnDataXAAccessor<double>> (data.info, userConfiguration);
366 else if (*data.info.type == typeid(char))
367 data.reader = std::make_shared<TestUtils::ColumnDataXAAccessor<char>> (data.info, userConfiguration);
368 else if (*data.info.type == typeid(std::uint8_t))
369 data.reader = std::make_shared<TestUtils::ColumnDataXAAccessor<std::uint8_t>> (data.info, userConfiguration);
370 else if (*data.info.type == typeid(std::uint16_t))
371 data.reader = std::make_shared<TestUtils::ColumnDataXAAccessor<std::uint16_t>> (data.info, userConfiguration);
372 else if (*data.info.type == typeid(std::uint32_t))
373 data.reader = std::make_shared<TestUtils::ColumnDataXAAccessor<std::uint32_t>> (data.info, userConfiguration);
374 else if (*data.info.type == typeid(std::uint64_t))
375 data.reader = std::make_shared<TestUtils::ColumnDataXAAccessor<std::uint64_t>> (data.info, userConfiguration);
376 else if (*data.info.type == typeid(std::vector<float>))
377 data.reader = std::make_shared<TestUtils::ColumnDataXAAccessor<std::vector<float>>> (data.info, userConfiguration);
378 else if (*data.info.type == typeid(std::vector<ElementLink<xAOD::CaloClusterContainer>>))
379 data.reader = std::make_shared<TestUtils::ColumnDataXAAccessor<std::vector<ElementLink<xAOD::CaloClusterContainer>>>> (data.info, userConfiguration);
380 else if (*data.info.type == typeid(std::vector<ElementLink<xAOD::TrackParticleContainer>>))
381 data.reader = std::make_shared<TestUtils::ColumnDataXAAccessor<std::vector<ElementLink<xAOD::TrackParticleContainer>>>> (data.info, userConfiguration);
382 else if (*data.info.type == typeid(std::vector<ElementLink<xAOD::VertexContainer>>))
383 data.reader = std::make_shared<TestUtils::ColumnDataXAAccessor<std::vector<ElementLink<xAOD::VertexContainer>>>> (data.info, userConfiguration);
384 }
385 }
386
387 bool allColumnsHandled = true;
388 for (auto& [name, data] : requestedColumns)
389 {
390 if (!data.reader)
391 {
392 allColumnsHandled = false;
393 std::cout << "WARNING: no handling for requested column: name=" << name << " offset=" << data.info.offsetName << " type=" << boost::core::demangle(data.info.type->name()) << std::endl;
394 }
395 }
396 if (!allColumnsHandled)
397 {
398 ADD_FAILURE() << "not all requested columns could be handled";
399 return;
400 }
401
402 for (auto& [name, data]: requestedColumns)
403 {
404 data.reader->connect (data, requestedColumns);
405 }
406
407 Benchmark benchmarkEmptyClear (testDefinition.name + " empty clear");
408 Benchmark benchmarkCallClear (testDefinition.name + " call clear");
409 Benchmark benchmarkGetEntry (testDefinition.name + " getEntry");
410 Benchmark benchmarkCheck (testDefinition.name + " check");
411 Benchmark benchmarkCall2 (testDefinition.name + " call2");
412 Benchmark benchmarkCall (testDefinition.name + " call");
413 Benchmark benchmarkEmpty ("empty");
414
415 const auto numberOfEvents = event.getEntries();
416 if (numberOfEvents == 0){
417 throw std::runtime_error ("ColumnarPhysLiteTest: numberOfEvents == 0");
418 }
419 Long64_t entry = 0;
420
421 // Instead of running for a fixed number of events, we run for a
422 // fixed amount of time. That is because individual tools can
423 // vary wildly in how long they take to run, and we mostly want to
424 // make sure that we ran the tool enough to get a precise
425 // performance estimate.
426 const auto startTime = std::chrono::high_resolution_clock::now();
427 for (; (std::chrono::high_resolution_clock::now() - startTime) < userConfiguration.targetTime; ++entry)
428 {
429 benchmarkEmpty.startTimer ();
430 benchmarkEmpty.stopTimer ();
431
432 benchmarkGetEntry.startTimer ();
433 event.getEntry (entry % numberOfEvents);
434 benchmarkGetEntry.stopTimer ();
435
436 ColumnVectorData columnData (&columnHeader);
437 for (auto& [name, data] : requestedColumns)
438 ASSERT_SUCCESS (data.reader->retrieveContainer (event, store, columnData));
439 for (auto& [name, data] : requestedColumns)
440 data.reader->retrieveAuxData (columnData);
441
442 benchmarkCheck.startTimer ();
443 columnData.checkData ();
444 benchmarkCheck.stopTimer ();
445 benchmarkCall.startTimer ();
446 columnData.callNoCheck (*myTool);
447 benchmarkCall.stopTimer ();
448 if (userConfiguration.runToolTwice)
449 {
450 benchmarkCall2.startTimer ();
451 columnData.callNoCheck (*myTool);
452 benchmarkCall2.stopTimer ();
453 }
454
455 benchmarkCallClear.startTimer ();
456 store.clear ();
457 benchmarkCallClear.stopTimer ();
458 benchmarkEmptyClear.startTimer ();
459 store.clear ();
460 benchmarkEmptyClear.stopTimer ();
461 }
462 std::cout << "Total entries read: " << entry << std::endl;
463 const float emptyTime = benchmarkEmpty.getEntryTime(0).value();
464 std::cout << "Empty benchmark time: " << emptyTime << "ns (tick=" << Benchmark::getTickDuration() << "ns)" << std::endl;
465 benchmarkEmpty.setSilence();
466 std::cout << "Average getEntry time: " << benchmarkGetEntry.getEntryTime(emptyTime).value() << "ns" << std::endl;
467 benchmarkGetEntry.setSilence();
468 std::cout << "Average clear time: " << benchmarkCallClear.getEntryTime(emptyTime).value() << "ns" << " (empty=" << benchmarkEmptyClear.getEntryTime(emptyTime).value() << "ns)" << std::endl;
469 benchmarkCallClear.setSilence();
470 benchmarkEmptyClear.setSilence();
471
472 // Column performance table
473 {
474 std::vector<BranchPerfData> columnPerfData;
475 BranchPerfData summary;
476 summary.name = "total";
477 summary.timeRead = 0;
478 summary.timeReadAgain = 0;
479 summary.timeShallowCopy = 0;
480 summary.timeShallowRegister = 0;
481 for (auto& [name, data] : requestedColumns)
482 {
483 auto perfData = data.reader->getPerfData(emptyTime);
484 if (perfData.timeRead.has_value() || perfData.timeReadAgain.has_value())
485 {
486 columnPerfData.push_back(perfData);
487 summary.timeRead.value() += perfData.timeRead.value_or(0);
488 summary.timeReadAgain.value() += perfData.timeReadAgain.value_or(0);
489 summary.timeShallowCopy.value() += perfData.timeShallowCopy.value_or(0);
490 summary.timeShallowRegister.value() += perfData.timeShallowRegister.value_or(0);
491 }
492 }
493 std::sort(columnPerfData.begin(), columnPerfData.end(), [](const auto& a, const auto& b) { return a.name < b.name; });
494 columnPerfData.push_back(summary);
495
496 const std::size_t nameWidth = std::max_element(columnPerfData.begin(), columnPerfData.end(), [](const auto& a, const auto& b) { return a.name.size() < b.name.size(); })->name.size();
497 std::string header = std::format("{:{}} | 1st(ns) | 2nd(ns) | shallow copy(ns)", "column name", nameWidth);
498 std::cout << "\n" << header << std::endl;
499 std::cout << std::string(header.size(), '-') << std::endl;
500 for (auto& data : columnPerfData)
501 {
502 if (data.name == "total")
503 std::cout << std::string(header.size(), '-') << std::endl;
504 std::cout << std::format("{:{}} |", data.name, nameWidth);
505 if (data.timeRead)
506 std::cout << std::format("{:>8.0f} |", data.timeRead.value());
507 else
508 std::cout << " |";
509 if (data.timeReadAgain)
510 std::cout << std::format("{:>8.1f} |", data.timeReadAgain.value());
511 else
512 std::cout << " |";
513 if (data.timeShallowCopy || data.timeShallowRegister)
514 std::cout << std::format("{:>10.0f} +{:>5.0f}", data.timeShallowCopy.value_or(-1), data.timeShallowRegister .value_or(-1));
515 std::cout << std::endl;
516 }
517 }
518
519 // Tool performance table
520 {
521 std::vector<ToolPerfData> toolPerfData;
522 toolPerfData.emplace_back();
523 toolPerfData.back().name = testDefinition.name;
524 toolPerfData.back().timeCall = benchmarkCall.getEntryTime(emptyTime);
525 if (userConfiguration.runToolTwice)
526 toolPerfData.back().timeCall2 = benchmarkCall2.getEntryTime(emptyTime);
527 toolPerfData.back().timeCheck = benchmarkCheck.getEntryTime(emptyTime);
528 benchmarkCall.setSilence();
529 benchmarkCall2.setSilence();
530 benchmarkCheck.setSilence();
531
532 const std::size_t nameWidth = std::max_element(toolPerfData.begin(), toolPerfData.end(), [](const auto& a, const auto& b) { return a.name.size() < b.name.size(); })->name.size();
533 std::string header = std::format("{:{}} | call(ns) | call2(ns) | check(ns)", "tool name", nameWidth);
534 std::cout << "\n" << header << std::endl;
535 std::cout << std::string(header.size(), '-') << std::endl;
536 for (auto& data : toolPerfData)
537 {
538 std::cout << std::format("{:{}} |", data.name, nameWidth);
539 if (data.timeCall)
540 std::cout << std::format("{:>9.0f} |", data.timeCall.value());
541 else
542 std::cout << " |";
543 if (data.timeCall2)
544 std::cout << std::format("{:>10.0f} |", data.timeCall2.value());
545 else
546 std::cout << " |";
547 if (data.timeCheck)
548 std::cout << std::format("{:>10.1f}", data.timeCheck.value());
549 std::cout << std::endl;
550 }
551 }
552 }
553 }
554}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ANA_CHECK_THROW(EXP)
check whether the given expression was successful, throwing an exception on failure
int numberOfEvents()
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
static Double_t a
if(pathvar)
size_t size() const
Number of registered mappings.
void record(const T *p, const std::string &key)
Definition TestStore.h:81
a class that holds the columnar data for a single call
void checkData() const
do a basic check of the data vector
void callNoCheck(const IColumnarTool &tool)
call the tool with the assembled data, without performing any checks on the data
the header information for the entire columnar data vector
the base class for all columnar components
this is a simple benchmarking helper class wrapping timers from std::chrono
Definition Benchmark.h:51
static float getTickDuration()
Definition Benchmark.h:86
std::optional< float > getEntryTime(float emptyTime) const
Definition Benchmark.h:74
a class that interfaces an IColumnarTool to a ColumnVectorHeader
Tool for accessing xAOD files outside of Athena.
A relatively simple transient store for objects created in analysis.
Definition TStore.h:45
::StatusCode StatusCode
StatusCode definition for legacy code.
TestStore store
Definition TestStore.cxx:23
unsigned long long T
void runXaodArrayTest(const UserConfiguration &userConfiguration, const TestDefinition &testDefinition, TFile *file)
@ output
an output column
Definition ColumnInfo.h:24
@ input
an input column
Definition ColumnInfo.h:21
void renameContainers(IColumnarTool &tool, const std::vector< std::pair< std::string, std::string > > &renames)
rename containers in the columnar tool
const std::string eventRangeColumnName
the default name for the column containing the event range
std::size_t ColumnarOffsetType
the type used for the size and offsets in the columnar data
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
EventInfo_v1 EventInfo
Definition of the latest event info version.
ShallowCopyResult_t< T > shallowCopy(const T &cont, const EventContext &ctx)
Create a shallow copy of an existing container.
the performance data for reading a single branch/column
std::vector< std::pair< std::string, std::string > > containerRenames
the container name remappings to apply
TFile * file