Please submit feature requests and bugs to https://sft.its.cern.ch/jira/projects/PODIO
Browse the API documentation created with Doxygen at
If you are on lxplus, all the necessary software is preinstalled.
On Mac OS or Ubuntu, you need to install the following software.
Install ROOT 6.08.06 (or later) and set up your ROOT environment:
Check the python version by doing:
Check that the yaml python module is available
python >>> import yaml
If the import goes fine (no message), you're all set. If not, you need to install yaml. For that, you need to:
1- install the C++ yaml library, which is used by the python module. On Mac OS, The easiest way to do that is to use homebrew (install homebrew if you don't have it yet):
brew install libyaml
2- install the python yaml module (first install pip if you don't have it yet)
pip install yaml
Check that you can now import the yaml module in python.
Preparing the environment
Before building and installing this package, and everytime you need to use it, do:
Set up separate build and install areas, and trigger the build:
mkdir build mkdir install cd build cmake -DCMAKE_INSTALL_PREFIX=../install .. make -j 4 install
To see a list of options, do this in the build-directory:
cmake -LH ..
The examples are for creating a file "example.root",
reading it again in C++,
and reading it again in python,
Modifying the data model
Podio features an example event data model, fully described in the yaml file tests/datalayout.yaml. The C++ in tests/datamodel/ has been fully generated by a code generation script, python/podio_class_generator.py.
To run the code generation script, do
mkdir ../Tmp mkdir ../Tmp/data mkdir ../Tmp/src python ../python/podio_class_generator.py ../examples/datalayout.yaml ../Tmp data
The generation script has the following additional options:
-c): Apply clang-format after file creation (uses option
-style=filewith llvm as backup style), needs clang-format in
-q): Suppress all print out to STDOUT
-d): Only run the generation logic and validate yaml, do not write files to disk
After compilation and installation (!) you can run rudimentary tests with