DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
wib_binary_file_converter.py
Go to the documentation of this file.
1#!/usr/bin/env python3
2
3from rawdatautils import file_conversion
4import click
5
6@click.command()
7@click.option('--fromf', type=click.Path(exists=True), help="Full path to file you want to convert from")
8@click.option('--tof', type=click.STRING, help="Full path to file you want to convert to")
9@click.option('--ftype', type=click.Choice(['wib2','wibeth','tde'], case_sensitive=True), default='wibeth', help="Format to convert to")
10
11def main(fromf, tof, ftype):
12 """This script converts ProtoWIB binary files into either WIB2, WIBETH, or TDE format"""
13
14 if ftype == 'wib2':
15 file_conversion.wib_binary_to_wib2_binary(fromf, tof)
16 elif ftype == 'tde':
17 file_conversion.wib_binary_to_tde_binary(fromf, tof)
18 else:
19 file_conversion.wib_binary_to_wibeth_binary(fromf, tof)
20
21
22if __name__ == '__main__':
23 main()