Part 1 : Quick Start
The program phoenix_hdf5 is a code generator which automates class development that use HDF5 data format. This adds a small overlay to gather and mutualise several tables use in the same class (composed of tables and tensors of any types supported by HDF5).
To run phoenix_hdf5 :
phoenix_hdf5 -i baseConfig.ph5 -o outputDir
Where outputDir is the output directory where to create generated code (current directory by default) and the baseConfig.ph5 is the class description. Five files will be generated :
- baseConfig.h : Header of the temporary to be used without HDF5 dependency
- baseConfig.cpp : Source of the temporary to be used without HDF5 dependency
- baseConfig_hdf5.h : Header of the HDF5 class to be used with HDF5 dependency
- baseConfig_hdf5.cpp : Source of the HDF5 class to be used with HDF5 dependency
- baseConfig_test.cpp : Source of the generated unit tests to prove everything is well generated
A simple example :
1 2 3 4 5 6 7 8 9 10 11 |
///Table of values TableVertex{ ///Event id size_t eventId; ///Timestamp double timestamp; ///Image Tensor(float, nbPixel) image; ///Float value Tensor(float, nbValue, 2) matValue; } |
Here, the name of the generated class is TableVertex. All the defined attributes are stored and read in the same order they are defined.
A Tensor is defined by its type, first, and then all its dimentions (with variables or fixed values) and you can use as many as dimentions you need.
Documentation and Unit Tests are also generated to easly check if the generated code is well used.