Skip to content
Snippets Groups Projects
Commit 73fdbd8f authored by Cody Messick's avatar Cody Messick
Browse files

coinc_extractor: add process table and process params table to output

(fixes bug where uploads with files from coinc_extractor wouldn't show
sngl_inspiral contents on gracedb, at least as recent as Feb 2018)
parent bbf7f4a0
No related branches found
No related tags found
No related merge requests found
Pipeline #29887 passed
......@@ -25,6 +25,10 @@ from optparse import OptionParser
def snglrow(connection):
return lsctables.table.get_table(dbtables.get_xml(connection), lsctables.SnglInspiralTable.tableName).row_from_cols
def procrow(connection):
return lsctables.table.get_table(dbtables.get_xml(connection), lsctables.ProcessTable.tableName).row_from_cols
def procparamrow(connection):
return lsctables.table.get_table(dbtables.get_xml(connection), lsctables.ProcessParamsTable.tableName).row_from_cols
def coincrow(connection):
return lsctables.table.get_table(dbtables.get_xml(connection), lsctables.CoincInspiralTable.tableName).row_from_cols
def coinceventrow(connection):
......@@ -63,6 +67,24 @@ else:
for (cid, time, ifos) in cids:
xmldocmain = ligolw.Document()
xmldoc = xmldocmain.appendChild(ligolw.LIGO_LW())
# process table
process = lsctables.New(lsctables.ProcessTable)
xmldoc.appendChild(process)
rowfunc = procrow(db)
# FIXME Can probably take less process information
# FIXME Add process information about this program
for val in db.cursor().execute('SELECT * FROM process'):
process.append(rowfunc(val))
# process params table
process = lsctables.New(lsctables.ProcessParamsTable)
xmldoc.appendChild(process)
rowfunc = procparamrow(db)
# FIXME Can probably take less param information
# FIXME Add process param information about this program
for val in db.cursor().execute('SELECT * FROM process_params'):
process.append(rowfunc(val))
# coinc inspiral table
coincinspiral = lsctables.New(lsctables.CoincInspiralTable)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment