5 Get list of runs taken in last xx seconds
9 __usage__ =
'''%prog [options]
11 Get list of runs taken in last xx seconds
13 from DQUtils.oracle
import fetch_recent_runs
16 from optparse
import OptionParser
17 parser = OptionParser(usage=__usage__, version=__version__)
18 parser.add_option(
'',
'--outputDir', dest=
'outputDir', default=
'/afs/cern.ch/user/a/atlidbs/nt/DataPeriods/data_latest', help=
'Output directory for file with run list')
19 (options,args) = parser.parse_args()
23 parser.error(
'wrong number of command line arguments')
27 filename = options.outputDir+
'/'+fileLabel+
'.runs.list'
30 if path.exists(filename):
31 os.system(
'rm ' + filename)
33 with open(filename,
'w')
as f: