From d5658cea4b4916275a63609e0b4f0c334cc666ad Mon Sep 17 00:00:00 2001
From: Kipp Cannon <kipp.cannon@ligo.org>
Date: Wed, 24 Apr 2019 17:24:56 +0900
Subject: [PATCH] streamthinca / lloidhandler:  detangle trigger class import

- there was a time when streamthinca needed to define a special class to be
  used for triggers to allow the coincidence algorithm to work, and so it
  made sense for the definition to live in streamthinca where the
  requirements were defined.  today no special class is required, the
  underlying trigger class is simply used as-is, but code like lloidhandler
  is still importing the symbol from streamthinca instead of importing it
  themselves directly.  this patch untangles this now gratuituous
  interdependency.
---
 gstlal-inspiral/python/lloidhandler.py | 3 ++-
 gstlal-inspiral/python/streamthinca.py | 1 -
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gstlal-inspiral/python/lloidhandler.py b/gstlal-inspiral/python/lloidhandler.py
index 3646893021..ac12d9846f 100644
--- a/gstlal-inspiral/python/lloidhandler.py
+++ b/gstlal-inspiral/python/lloidhandler.py
@@ -85,6 +85,7 @@ from gstlal import inspiral
 from gstlal import pipeio
 from gstlal import simplehandler
 from gstlal import streamthinca
+from gstlal.snglinspiraltable import GSTLALSnglInspiral as SnglInspiral
 import lal
 from lal import LIGOTimeGPS
 from lal import rate
@@ -970,7 +971,7 @@ class Handler(simplehandler.Handler):
 				# FIXME why does mapinfo.data come out as
 				# an empty list on some occasions???
 				if mapinfo.data:
-					events.extend(streamthinca.SnglInspiral.from_buffer(mapinfo.data))
+					events.extend(SnglInspiral.from_buffer(mapinfo.data))
 				memory.unmap(mapinfo)
 
 			# FIXME:  ugly way to get the instrument
diff --git a/gstlal-inspiral/python/streamthinca.py b/gstlal-inspiral/python/streamthinca.py
index f95b9ee189..5c4f6f29a2 100644
--- a/gstlal-inspiral/python/streamthinca.py
+++ b/gstlal-inspiral/python/streamthinca.py
@@ -46,7 +46,6 @@ import time
 
 from ligo.lw import ligolw
 from ligo.lw import lsctables
-from gstlal.snglinspiraltable import GSTLALSnglInspiral as SnglInspiral
 import lal
 from lalburst import snglcoinc
 from lalinspiral import thinca
-- 
GitLab