1 from __future__
import absolute_import
2 import re, json, datetime
3 from .rrapi
import RRApi, RRApiError
5 URL =
"http://runregistry.web.cern.ch/runregistry/" 12 result = api.data(workspace =
'GLOBAL',
18 'startTime',
'duration',
19 'hltkey',
'gtKey',
'l1Menu',
'tscKey',
'triggerMode',
23 query =
"{number} > %d and {lsCount} > %d and {triggers} > 0" % (run, minLumis),
26 for runDict
in result :
27 runNo =
int(runDict[
'number'])
28 runDict[
'date'] = datetime.datetime.strptime(runDict[
'startTime'],
"%a %d-%m-%y %H:%M:%S").
date().strftime(
'%Y%m%d')
33 print "RunRegistry API 'app' != user, who knows why... :<" 35 except RRApiError
as e:
38 if __name__ ==
'__main__' :
def getRunsNewer(run, minLumis)