PODIO v00-16-03
An Event-Data-Model Toolkit for High Energy Physics Experiments
Loading...
Searching...
No Matches
read.cpp File Reference
#include "podio/ROOTReader.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.cpp.

4 {
5 auto reader = podio::ROOTReader();
6 try {
7 reader.openFile("example.root");
8 } catch (const std::runtime_error& e) {
9 std::cout << "File could not be opened, aborting." << std::endl;
10 return 1;
11 }
12
13 if (reader.currentFileVersion() != podio::version::build_version) {
14 return 1;
15 }
16
17 run_read_test(reader);
18
19 // jump back and forth a bit
20 run_read_test_event(reader, 10);
21 run_read_test_event(reader, 150);
22 run_read_test_event(reader, 120);
23 run_read_test_event(reader, 0);
24
25 reader.closeFile();
26 return 0;
27}
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