From 4da87c3584526e9be9b6430f3f1ad5920962fee2 Mon Sep 17 00:00:00 2001
From: Daichi Tsuna <daichi.tsuna@ligo.org>
Date: Sun, 16 Jun 2019 05:56:33 -0700
Subject: [PATCH] gstlal_cs_triggergen: record search_summary.nevents

dump number of events in the coinc_events table.
---
 gstlal-burst/bin/gstlal_cs_triggergen | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/gstlal-burst/bin/gstlal_cs_triggergen b/gstlal-burst/bin/gstlal_cs_triggergen
index 9fa67a5000..c305075ec7 100755
--- a/gstlal-burst/bin/gstlal_cs_triggergen
+++ b/gstlal-burst/bin/gstlal_cs_triggergen
@@ -495,12 +495,13 @@ if options.verbose:
 	print >>sys.stderr, "running pipeline ..."
 mainloop.run()
 
+handler.flush()
+
 
 #
-# write output to disk
-# FIXME vetoes table also needs to be dumped here
-# with ligolw_add
+# obtain nevents from the coinc event table, and write output to disk
+# FIXME vetoes table also needs to be dumped here with ligolw_add
+#
 
-handler.flush()
-# FIXME search_summary.nevents is still zero
+search_summary.nevents = len(lsctables.CoincTable.get_table(xmldoc))
 ligolw_utils.write_filename(xmldoc, options.output, gz = (options.output or "stdout").endswith(".gz"), verbose = options.verbose)
-- 
GitLab