From 4848142a4f30cbe79b00313d53ea0c9f3aaba835 Mon Sep 17 00:00:00 2001
From: Tamas Gal <tgal@km3net.de>
Date: Fri, 28 Jun 2019 15:08:47 +0200
Subject: [PATCH] Add error when dom is not in detector

---
 scripts/pmt_rates.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/pmt_rates.py b/scripts/pmt_rates.py
index 202acbb..7afc8b5 100755
--- a/scripts/pmt_rates.py
+++ b/scripts/pmt_rates.py
@@ -128,7 +128,6 @@ class PMTRates(kp.Module):
         plt.close('all')
 
     def process(self, blob):
-        print("Got data...")
         try:
             tmch_data = TMCHData(io.BytesIO(blob['CHData']))
         except ValueError:
@@ -138,6 +137,7 @@ class PMTRates(kp.Module):
         dom_id = tmch_data.dom_id
 
         if dom_id not in self.detector.doms:
+            self.log.error(f"DOM ID {dom_id} not in detector definition!")
             return blob
 
         du, floor, _ = self.detector.doms[dom_id]
-- 
GitLab