Add mdfwriter.py script
It can be used for converting data from ROOT formats to MDF but also to subset MDF data (e.g. first N events).
LHCb/run mdfwriter.py -h
usage: mdfwriter.py [-h] -o OUTPUT [-f] [--db-entry] [--start START] [-n NEVENTS | --stop STOP] files [files ...]
Convert data to MDF format
positional arguments:
files Input filenames or TestFileDB entry
optional arguments:
-h, --help show this help message and exit
-o OUTPUT, --output OUTPUT
Output filename
-f, --force Overwrite output file if it exists
--db-entry Interpret the file as a TestFileDB entry
--start START First event to write
-n NEVENTS, --nevents NEVENTS
Number of events to write
--stop STOP Last event to write (exclusive)
This kind of generalizes ExampleXDigiToMDF.py, so we might decide to drop it.