If you are interested in our GSoC project to implement an HDF5 layer in the High-Energy Physics event model software PODIO, then please complete the following evaluation test.
This exercise can be completed on most modern Linux distributions, such as Ubuntu18.04, CentOS7, Fedora29. OS X is possible, but more tricky to setup, so we do not recommend it. It is not possible to use Windows.
If you do not have direct access to a suitable platform we provide a
Docker container
that you can use to complete the exercise, graemeastewart/u18-podio
.
(It is not necessary to have root access in the container, but if you need it
you can use sudo
and the password is hsf
.)
-
Clone a local copy of the PODIO repository from GitHub.
-
Install a local copy of the HEP ROOT software
- We recommend using the latest stable version of ROOT (6.16.00).
- Downloading a pre-built version of ROOT is perfectly acceptable.
- N.B. In the
graemeastewart/u18-podio
container this is provided for you, installed into/opt
.
-
Compile PODIO and run its unit tests, to check that your development setup is working.
- Follow the instructions on the PODIO github.
- Finally,
make test
should run and successfully complete the five PODIO unit tests.
N.B. If you are having trouble with any dependencies in your environment you can consult the Dockerfiles of the container we provided and that might help you solve the issue: 1 and 2.
-
Write a shell script that will checkout the PODIO code, compile it and run the unit tests.
-
Study the PODIO sample data model in
tests/datalayout.yaml
. -
Look at the data object
SimpleStruct
, and make sure you understand how the data is represented as a C++ object.- The code in
tests/src
andtests/datamodel
will help.
- The code in
-
Write a code example in C++ that will use the HDF5 libraries to
- Create a
SimpleStruct
array, of size 100, in memory and write some predictable data into it. - Create a compound HDF5 datatype that corresponds to the
SimpleStruct
. - Write the
SimpleStruct
data into an HDF5 file. - N.B. it's not necessary to use the PODIO C++ code for this, but you can if you want.
- Create a
-
Write a second piece of code in C++ that will reread the HDF5 file and check that the
SimpleStruct
array is successfully deserialised into memory. -
Your code should at least compile using
make
; usingcmake
is also fine.
You can submit your answer by sending the mentors a link to a github repository with the solution.
- Make sure you include:
- The shell script that will checkout PODIO, comple and test it.
- The C++ to write and read back
SimpleStuct
s in HDF5 format. - A
README.md
that describes how to compile and run your solution.
It is advisable that you test that your solution works properly
in the graemeastewart/u18-podio
container - this is what we will
use for testing the solutions.
If you need clarification on any aspect of the test then you are very welcome to contact the mentors:
- Graeme Stewart graeme.andrew.stewart@cern.ch
- Benedikt Hegner bhegner@bnl.gov
- Frank Gaede frank.gaede@desy.de