Variables
fixRunHistoryEndTimesViaNearline Namespace Reference

Variables

 conn = psycopg2.connect("dbname=nova_prod host=novadaq-far-db-03.fnal.gov port=5432 user=novadaq")
 
 conn2 = psycopg2.connect("dbname=nova_prod host=ifdbprod.fnal.gov port=5433 user=nova_reader")
 
 cur = conn.cursor()
 
 cur2 = conn2.cursor()
 
string SQL = "select run,tstart from fardet.runs where tstop is NULL order by run desc"
 
 rows = cur.fetchall()
 
tuple runlist = (x for x in rows[1:])
 
 maxsubrun = cur2.fetchone()[0]
 
 minsubrun = cur2.fetchone()[0]
 
 endtime = cur2.fetchall()
 
 starttime = cur2.fetchall()
 
 tdiff = run[1]-starttime[0][0]+timedelta(minutes=5)
 
 nhour = int(tdiff.total_seconds()/(60*60))
 
 toff = timedelta(hours=nhour)
 
 newtimestamp = endtime[0][0]+toff
 

Variable Documentation

fixRunHistoryEndTimesViaNearline.conn = psycopg2.connect("dbname=nova_prod host=novadaq-far-db-03.fnal.gov port=5432 user=novadaq")

Definition at line 6 of file fixRunHistoryEndTimesViaNearline.py.

fixRunHistoryEndTimesViaNearline.conn2 = psycopg2.connect("dbname=nova_prod host=ifdbprod.fnal.gov port=5433 user=nova_reader")

Definition at line 13 of file fixRunHistoryEndTimesViaNearline.py.

fixRunHistoryEndTimesViaNearline.cur = conn.cursor()

Definition at line 18 of file fixRunHistoryEndTimesViaNearline.py.

fixRunHistoryEndTimesViaNearline.cur2 = conn2.cursor()

Definition at line 19 of file fixRunHistoryEndTimesViaNearline.py.

Referenced by LZ4HC_compress_optimal().

fixRunHistoryEndTimesViaNearline.endtime = cur2.fetchall()

Definition at line 38 of file fixRunHistoryEndTimesViaNearline.py.

fixRunHistoryEndTimesViaNearline.maxsubrun = cur2.fetchone()[0]

Definition at line 31 of file fixRunHistoryEndTimesViaNearline.py.

fixRunHistoryEndTimesViaNearline.minsubrun = cur2.fetchone()[0]

Definition at line 34 of file fixRunHistoryEndTimesViaNearline.py.

fixRunHistoryEndTimesViaNearline.newtimestamp = endtime[0][0]+toff

Definition at line 46 of file fixRunHistoryEndTimesViaNearline.py.

fixRunHistoryEndTimesViaNearline.nhour = int(tdiff.total_seconds()/(60*60))

Definition at line 43 of file fixRunHistoryEndTimesViaNearline.py.

fixRunHistoryEndTimesViaNearline.rows = cur.fetchall()

Definition at line 25 of file fixRunHistoryEndTimesViaNearline.py.

tuple fixRunHistoryEndTimesViaNearline.runlist = (x for x in rows[1:])

Definition at line 26 of file fixRunHistoryEndTimesViaNearline.py.

Referenced by GetManualSubruns().

string fixRunHistoryEndTimesViaNearline.SQL = "select run,tstart from fardet.runs where tstop is NULL order by run desc"

Definition at line 21 of file fixRunHistoryEndTimesViaNearline.py.

fixRunHistoryEndTimesViaNearline.starttime = cur2.fetchall()

Definition at line 41 of file fixRunHistoryEndTimesViaNearline.py.

fixRunHistoryEndTimesViaNearline.tdiff = run[1]-starttime[0][0]+timedelta(minutes=5)
fixRunHistoryEndTimesViaNearline.toff = timedelta(hours=nhour)

Definition at line 45 of file fixRunHistoryEndTimesViaNearline.py.