Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
N21-04-12
ChannelInfo
OnMonAna
Namespaces
|
Variables
fillBadChanDBTables.py File Reference
Go to the source code of this file.
Namespaces
fillBadChanDBTables
Variables
fillBadChanDBTables.det
= sys.argv[1]
string
fillBadChanDBTables.lastrunFile
= "lastrun{}"
fillBadChanDBTables.conn
= psycopg2.connect("dbname=nova_prod host=ifdbrep.fnal.gov user=nova_reader
port
=5436")
fillBadChanDBTables.cur
= conn.cursor()
fillBadChanDBTables.f
=
open
(lastrunFile,'
r
')
fillBadChanDBTables.firstrun
=
int
(f.readline())
string
fillBadChanDBTables.exceptionsFile
= "exceptions"
list
fillBadChanDBTables.exceptionRuns
= []
string
fillBadChanDBTables.SQL
= "select
run
,tstart,tstop from {}.runs where partition=1 and
run
>{} and nsubruns>4 and tstart < 'yesterday' order by
run
asc"
fillBadChanDBTables.rows
= cur.fetchall()
int
fillBadChanDBTables.irow
= 0
fillBadChanDBTables.nrows
=
len
(rows)
int
fillBadChanDBTables.step
= 20
fillBadChanDBTables.rowList
= rows[irow:irow+
step
]
list
fillBadChanDBTables.runList
= []
fillBadChanDBTables.nrun
=
len
(rowList)
fillBadChanDBTables.firstRun
= rowList[0][0]
fillBadChanDBTables.lastRun
= rowList[nrun-1][0]
string
fillBadChanDBTables.cmd
= "getBadChannels -pdh releases{}.txt {}"
string
fillBadChanDBTables.errorMsg
= "Run {} found
in
the exceptions file. Skipping."
fillBadChanDBTables.tstop
= row[2]
fillBadChanDBTables.result
=
os.system
(cmd)
Generated on Tue Apr 13 2021 14:15:43 for NOvA by
1.8.11