From 65819b659e447478cf4d3c2a130500b88be2934a Mon Sep 17 00:00:00 2001
From: Tamas Gal <tgal@km3net.de>
Date: Sat, 23 Nov 2019 09:19:00 +0100
Subject: [PATCH] Improve debug output

---
 scripts/ztplot.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/scripts/ztplot.py b/scripts/ztplot.py
index 3c983c5..4762561 100755
--- a/scripts/ztplot.py
+++ b/scripts/ztplot.py
@@ -143,7 +143,6 @@ class ZTPlot(kp.Module):
                 self.create_plot(event_info, hits)
 
     def create_plot(self, event_info, hits):
-        print(self.__class__.__name__ + ": updating plot.")
 
         trigger_mask = event_info.trigger_mask[0]
         det_id = event_info.det_id[0]
@@ -161,9 +160,11 @@ class ZTPlot(kp.Module):
                 'n_hits'] or n_triggered_hits > self.records["n_triggered_hits"]
 
         if not is_new_record or (utc_timestamp - self.last_plot_time) < 60:
-            print("Skipping plot...")
+            self.log.debug("Skipping plot...")
             return
 
+        self.cprint(self.__class__.__name__ + ": updating plot.")
+
         dus = set(hits.du)
         n_dus = len(dus)
 
-- 
GitLab