From cdf16901ed44a0ed4e198c71a178243d8971e572 Mon Sep 17 00:00:00 2001
From: Kipp Cannon <kipp.cannon@ligo.org>
Date: Thu, 29 Mar 2018 02:59:25 -0500
Subject: [PATCH] streamthinca: simplify .last_coincs clean-up

---
 gstlal-inspiral/python/streamthinca.py | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/gstlal-inspiral/python/streamthinca.py b/gstlal-inspiral/python/streamthinca.py
index c93c78f195..f58a6d4ab1 100644
--- a/gstlal-inspiral/python/streamthinca.py
+++ b/gstlal-inspiral/python/streamthinca.py
@@ -157,10 +157,6 @@ class StreamThinca(object):
 		an exercise for the calling code to ensure it follows the
 		rules.
 		"""
-		# invalidate the coinc extractor in case all that follows
-		# is a no-op
-		self.last_coincs = {}
-
 		# we need our own copy of the sngl_inspiral table because
 		# we need a place to store a history of all the triggers,
 		# and a place we can run coincidence on them.  when making
@@ -226,6 +222,10 @@ class StreamThinca(object):
 		# have been obtained on this iteration.
 		#
 
+		# invalidate the coinc extractor in case all that follows
+		# is a no-op
+		self.last_coincs = {}
+
 		# check that we've accumulated thinca_interval seconds, and
 		# that .add_events() has been called with some events since
 		# the last flush
@@ -355,10 +355,6 @@ class StreamThinca(object):
 
 
 	def flush(self, xmldoc, process_id, seglists, fapfar = None):
-		# invalidate the coinc extractor in case run_coincidence()
-		# is a no-op.
-		self.last_coincs = {}
-
 		# coincidence.
 		noncoinc_sngls = self.run_coincidence(xmldoc, process_id, segments.infinity(), seglists, fapfar = fapfar)
 
-- 
GitLab