Motivation
For one reason or another, you may find yourself in a situation where you have to use ROOT, but all you have is a bunch of AIDA files. We offer here a clean way of converting your AIDA Trees to simple ROOT trees.
Prerequisites
- You will need PAIDA. You want a version 3.2.1_2.10 or newer.
- You have to have a ROOT installation with the python bindings enabled, i.e.
--enable-python
must be passed to ROOT'sconfigure
script. - Download the attached script and put it where your AIDA files are
Limitations
The software comes without warranty. Always back up your data.
In its current state, the software can only process flat AIDA tuples, i.e. ITuple objects that only contain simple data types, like double, float, int. ITuple objects that contain ITuple objects are explicitly not supported, because they are a can of worms.
Furthermore, the scripts only converts one Tuple per file.
Running
The program is run as follows:
python aida_root_converter.py <file name of AIDA tree> <name of AIDA Tuple to be converted>
It produces a ROOT file where the .aida
ending of the AIDA tree is replaced by .root
. The name of the TTree is the same as the name of the AIDA ITuple that is passed as the second command-line argument. The names and types of the branches correspond to those in the AIDA file.
You may get an error message related to threading at the end of the process. This can be safely ignored