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

Also add warning if event time delta is greater than 5 minutes

parent 678db2b0
No related branches found
No related tags found
No related merge requests found
Pipeline #32439 passed
......@@ -207,9 +207,13 @@ class ZTPlot(kp.Module):
dt = datetime.utcfromtimestamp(utc_timestamp)
except OverflowError:
self.log.critical("OverflowError encountered when converting '%s' to "
"a datetime object." % utc_timestamp)
"a datetime object.", utc_timestamp)
dt = "invalid date"
delta_t = (datetime.utcnow() - dt).seconds
if abs(delta_t) > 60*5:
self.log.warning("The timestamp-delta of the event is '%s'", delta_t)
title = "z-t-Plot for DetID-{0} Run {1}, " \
"FrameIndex {2}, TriggerCounter {3}, Overlays {4}, " \
"Trigger: {5}\n{6} UTC".format(
......
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