13
14 h5_file = HDF5RawDataFile(filename)
15 file_layout_version = h5_file.get_version()
16
17
18 attr_name = "creation_timestamp"
19 if file_layout_version >= 6:
20 attr_value = h5_file.get_int_attribute(attr_name)
21 print(f'{attr_name} {attr_value}')
22 else:
23 attr_value = h5_file.get_attribute(attr_name)
24 print(f'{attr_name} {attr_value}')
25
26 attr_name = "closing_timestamp"
27 if file_layout_version >= 6:
28 attr_value = h5_file.get_int_attribute(attr_name)
29 print(f'{attr_name} {attr_value}')
30 else:
31 attr_value = h5_file.get_attribute(attr_name)
32 print(f'{attr_name} {attr_value}')
33
34 attr_name = "offline_data_stream"
35 try:
36 attr_value = h5_file.get_attribute(attr_name)
37 except RuntimeError:
38 attr_value = "cosmics"
39 print(f'{attr_name} {attr_value}')
40
41 attr_name = "run_was_for_test_purposes"
42 try:
43 attr_value = h5_file.get_attribute(attr_name)
44 except RuntimeError:
45 attr_value = "false"
46 print(f'{attr_name} {attr_value}')
47
48 attr_name = "file_recovery_timestamp"
49 try:
50 attr_value = h5_file.get_int_attribute(attr_name)
51 print(f'{attr_name} {attr_value}')
52 except RuntimeError:
53 pass
54
55 records = h5_file.get_all_record_ids()
56
57 print('=== start of record list')
58 for r in records:
59 print(f'{r[0]}.{r[1]}')
60 print('=== end of record list')
61
int main(int argc, char **argv)