Skip to content

Commit

Permalink
Merge pull request #85 from DUNE-DAQ/kbiery/integer_file_creation_and…
Browse files Browse the repository at this point in the history
…_closing_timestamps

Changes to convert the creation_timestamp and closing_timestamp HDF5 …
  • Loading branch information
bieryAtFnal authored Dec 14, 2024
2 parents d038565 + 35bd45f commit 301c511
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions scripts/print_values_for_file_transfer_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,24 @@
def main(filename):

h5_file = HDF5RawDataFile(filename)
file_layout_version = h5_file.get_version()
#print(f'file_layout_verion {file_layout_version}')

attr_name = "creation_timestamp"
attr_value = h5_file.get_attribute(attr_name)
print(f'{attr_name} {attr_value}')
if file_layout_version >= 6:
attr_value = h5_file.get_int_attribute(attr_name)
print(f'{attr_name} {attr_value}')
else:
attr_value = h5_file.get_attribute(attr_name)
print(f'{attr_name} {attr_value}')

attr_name = "closing_timestamp"
attr_value = h5_file.get_attribute(attr_name)
print(f'{attr_name} {attr_value}')
if file_layout_version >= 6:
attr_value = h5_file.get_int_attribute(attr_name)
print(f'{attr_name} {attr_value}')
else:
attr_value = h5_file.get_attribute(attr_name)
print(f'{attr_name} {attr_value}')

attr_name = "offline_data_stream"
try:
Expand Down

0 comments on commit 301c511

Please sign in to comment.