1 from __future__
import absolute_import
2 from __future__
import print_function
3 import re, json, datetime
4 from .rrapi
import RRApi, RRApiError
6 URL =
"http://runregistry.web.cern.ch/runregistry/" 13 result = api.data(workspace =
'GLOBAL',
19 'startTime',
'duration',
20 'hltkey',
'gtKey',
'l1Menu',
'tscKey',
'triggerMode',
24 query =
"{number} > %d and {lsCount} > %d and {triggers} > 0" % (run, minLumis),
27 for runDict
in result :
28 runNo =
int(runDict[
'number'])
29 runDict[
'date'] = datetime.datetime.strptime(runDict[
'startTime'],
"%a %d-%m-%y %H:%M:%S").
date().strftime(
'%Y%m%d')
34 print(
"RunRegistry API 'app' != user, who knows why... :<")
36 except RRApiError
as e:
39 if __name__ ==
'__main__' :
S & print(S &os, JobReport::InputFile const &f)
def getRunsNewer(run, minLumis)