11 reader.openFile(
"example.root");
12 }
catch (
const std::runtime_error& e) {
13 std::cout <<
"File could not be opened, aborting." << std::endl;
17 if (reader.currentFileVersion() != podio::version::build_version) {
18 std::cerr <<
"The podio build version could not be read back correctly. "
19 <<
"(expected:" << podio::version::build_version <<
", actual: " << reader.currentFileVersion() <<
")"
24 if (reader.getEntries(
"events") != 2000) {
25 std::cerr <<
"Could not read back the number of events correctly. "
26 <<
"(expected:" << 2000 <<
", actual: " << reader.getEntries(
"events") <<
")" << std::endl;
30 for (
size_t i = 0; i < reader.getEntries(
"events"); ++i) {
31 const auto frame =
podio::Frame(reader.readNextEntry(
"events"));
37 auto frame =
podio::Frame(reader.readEntry(
"events", 4));
40 auto nextFrame =
podio::Frame(reader.readNextEntry(
"events"));
43 auto previousFrame =
podio::Frame(reader.readEntry(
"events", 2));
44 processEvent(previousFrame, 2, reader.currentFileVersion());
void processEvent(StoreT &store, int eventNum, podio::version::Version fileVersion)