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