PODIO v00-16-03
An Event-Data-Model Toolkit for High Energy Physics Experiments
Loading...
Searching...
No Matches
read_sio.cpp File Reference
#include "podio/SIOReader.h"
#include "read_test.h"

Go to the source code of this file.

Functions

int main ()
 

Function Documentation

◆ main()

int main ( )

Definition at line 4 of file read_sio.cpp.

4 {
5 // auto reader = podio::SIOReader();
6 podio::SIOReader reader; // SIOReader has no copy c'tor ...
7 try {
8 reader.openFile("example.sio");
9 } catch (const std::runtime_error& e) {
10 std::cout << "File could not be opened, aborting." << std::endl;
11 return 1;
12 }
13
14 if (reader.currentFileVersion() != podio::version::build_version) {
15 return 1;
16 }
17
18 run_read_test(reader);
19
20 // jump back and forth a bit
21 run_read_test_event(reader, 10);
22 run_read_test_event(reader, 150);
23 run_read_test_event(reader, 120);
24 run_read_test_event(reader, 0);
25
26 reader.closeFile();
27 return 0;
28}
podio::version::Version currentFileVersion() const override
Get the podio version with which the current file has been written.
Definition: SIOReader.h:61
void closeFile() override
Definition: SIOReader.cc:74
void openFile(const std::string &filename) override
Definition: SIOReader.cc:62
void run_read_test(podio::IReader &reader)
Definition: read_test.h:466
void run_read_test_event(podio::IReader &reader, unsigned event)
Definition: read_test.h:497