CMS 3D CMS Logo

Functions
util.rrClient Namespace Reference

Functions

def getRunsNewer (run, minLumis)
 

Function Documentation

def util.rrClient.getRunsNewer (   run,
  minLumis 
)

Definition at line 8 of file rrClient.py.

References indexGen.date, createfilelist.int, and edm.print().

8 def getRunsNewer(run, minLumis):
9  try:
10  api = RRApi(URL)
11 
12  if api.app == "user":
13  result = api.data(workspace = 'GLOBAL',
14  table = 'runsummary',
15  template = 'json',
16  columns = [
17  'number',
18  'lsCount',
19  'startTime', 'duration',
20  'hltkey', 'gtKey', 'l1Menu', 'tscKey', 'triggerMode',
21  'triggers',
22  'runClassName',
23  ],
24  query = "{number} > %d and {lsCount} > %d and {triggers} > 0" % (run, minLumis),
25  )
26  runs = {}
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')
30  runs[runNo] = runDict
31  return runs
32 
33  else :
34  print("RunRegistry API 'app' != user, who knows why... :<")
35 
36  except RRApiError as e:
37  print(e)
38 
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
def getRunsNewer(run, minLumis)
Definition: rrClient.py:8