Go to the documentation of this file. 3 from __future__
import print_function
11 if (len(sys.argv) != 2):
12 print (
"Usage: dbjson.py [run number]")
18 conn = psycopg2.connect(
"dbname=lbne35t_prod host=ifdbrep.fnal.gov port=5440 user=lbne_reader password=dune35t")
20 print (
"I am unable to connect to the database")
25 SQL =
"select * from dune35t.run_summary where run="+run
35 comp =
"35t:"+comp.replace(
",",
":")
38 tstart =
str(row[4]).replace(
" ",
"T")[0:19]
39 tstop =
str(row[5]).replace(
" ",
"T")[0:19]
41 tstop =
str(tstop).replace(
"None",
str(tstart))
44 print (
" \"start_time\": \""+tstart+
"\",")
45 print (
" \"end_time\": \""+tstop+
"\",")
46 print (
" \"lbne_data.name\": \""+runType+
"\",")
47 print (
" \"lbne_data.detector_type\": \""+comp+
"\",")
48 print (
" \"lbne_data.run_mode\": \""+cfg+
"\"")