Skip to content
Snippets Groups Projects
Commit e7513c44 authored by Stefano Di Frischia's avatar Stefano Di Frischia
Browse files

L2SS-869: move querying into start_new_matrix procedure

parent e285441e
No related branches found
No related tags found
1 merge request!426Resolve L2SS-869 "Improve querying in stats writer"
......@@ -120,9 +120,6 @@ class HDF5Writer(ABC):
# grab the timestamp
statistics_timestamp = statistics_packet.timestamp()
# query the device attributes for updated values
self.retrieve_attribute_values()
# ignore packets with no timestamp, as they indicate FPGA processing was
# disabled and are useless anyway.
if statistics_packet.block_serial_number == 0:
......@@ -173,6 +170,8 @@ class HDF5Writer(ABC):
# write the finished (and checks if its the first matrix)
if self.current_matrix is not None:
try:
# query the device attributes for updated values
self.retrieve_attribute_values()
self.write_matrix()
except Exception as e:
time = self.current_timestamp.strftime(
......@@ -191,6 +190,7 @@ class HDF5Writer(ABC):
# create a new and empty current_matrix
self.current_matrix = self.new_collector()
self.statistics_header = None
self.device_attributes = {}
def write_matrix(self):
"""Writes the finished matrix to the hdf5 file"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment