Skip to content
Snippets Groups Projects
Verified Commit 678db2b0 authored by Tamas Gal's avatar Tamas Gal :speech_balloon:
Browse files

Add logging to the OverflowError in ztplot

The issue where it was first mentioned is https://git.km3net.de/working_groups/daq/-/issues/147
parent 0f753bd1
No related branches found
No related tags found
No related merge requests found
Pipeline #32438 passed
......@@ -203,12 +203,18 @@ class ZTPlot(kp.Module):
if trig_check(int(trigger_mask))
])
try:
dt = datetime.utcfromtimestamp(utc_timestamp)
except OverflowError:
self.log.critical("OverflowError encountered when converting '%s' to "
"a datetime object." % utc_timestamp)
dt = "invalid date"
title = "z-t-Plot for DetID-{0} Run {1}, " \
"FrameIndex {2}, TriggerCounter {3}, Overlays {4}, " \
"Trigger: {5}\n{6} UTC".format(
det_id, run_id, frame_index, trigger_counter,
overlays, trigger_params,
datetime.utcfromtimestamp(utc_timestamp))
overlays, trigger_params, dt)
filename = 'ztplot'
f = os.path.join(self.plots_path, filename + '.png')
......
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