Closed Vindaar closed 9 months ago
It's as general as it is going to get. I have no interest in working on that further. When needed I would just code up a few lines in Nim using the ROOT wrapper and nimhdf5
. Much quicker and easier to implement for me. :man_shrugging:
The
RootToHdf5
python script created from https://github.com/Vindaar/TimepixAnalysis/blob/master/CDL-RootToHdf5/CDL-toH5_likelihood.py in #40 is still specific to the Marlin ROOT trees to some extent, since we map all data types to float exceptX/YCoordinateVector
, which we map to variable lengthuint8
and the charge vectors touint16
.We instead have to extract the data types and shapes from the ROOT tree directly and then create the appropriate dataset with the correct shape, read the whole datasets and write them in one go. Instead of currently iterating field by field, which is super slow (which was implemented back when we had a different goal in mind for this script, namely only extract certain fields).