From fa4a2ff28ecda1806598942dfcfaf7c789db3f32 Mon Sep 17 00:00:00 2001
From: gstlalcbc <gstlalcbc@ldas-pcdev1.ligo-wa.caltech.edu>
Date: Tue, 9 Jul 2019 14:24:07 -0700
Subject: [PATCH] FAR trials factor command line option

---
 gstlal-inspiral/bin/gstlal_ll_inspiral_pipe | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gstlal-inspiral/bin/gstlal_ll_inspiral_pipe b/gstlal-inspiral/bin/gstlal_ll_inspiral_pipe
index 560bd9b545..fccaba32c3 100755
--- a/gstlal-inspiral/bin/gstlal_ll_inspiral_pipe
+++ b/gstlal-inspiral/bin/gstlal_ll_inspiral_pipe
@@ -203,6 +203,7 @@ def parse_command_line():
 	parser.add_option("--influx-database-name", help = "Specify the database name for the influxDB database. Required if --data-backend = influx.")
 	parser.add_option("--enable-auth", action = "store_true", default=False, help = "If set, enables authentication for the influx aggregator.")
 	parser.add_option("--enable-https", action = "store_true", default=False, help = "If set, enables HTTPS connections for the influx aggregator.")
+	parser.add_option("--FAR-trialsfactor", metavar = "trials", type = "float", default = 1.0, help = "Add trials factor to FAR before uploading to gracedb")
 
 	options, filenames = parser.parse_args()
 
@@ -434,6 +435,7 @@ for num_insp_nodes, (svd_banks, likefile, zerolikefile) in enumerate(zip(bank_gr
 		"gracedb-service-url":options.gracedb_service_url,
 		"job-tag":jobTags[-1],
 		"likelihood-snapshot-interval":options.likelihood_snapshot_interval,
+		"FAR-trialsfactor":options.FAR_trialsfactor,
 		"min-instruments":options.min_instruments,
 		"time-slide-file":options.time_slide_file,
 		"output-kafka-server": options.output_kafka_server
@@ -496,6 +498,7 @@ for num_insp_nodes, (svd_banks, likefile, zerolikefile) in enumerate(zip(bank_gr
 			"gracedb-service-url":options.inj_gracedb_service_url,
 			"job-tag":inj_jobTags[-1],
 			"likelihood-snapshot-interval":options.likelihood_snapshot_interval,
+			"FAR-trialsfactor":options.FAR_trialsfactor,
 			"min-instruments":options.min_instruments,
 			"time-slide-file":options.time_slide_file
 			}
-- 
GitLab