CMS 3D CMS Logo

Functions | Variables
util.rrClient Namespace Reference

Functions

def getRunsNewer (run, minLumis)
 

Variables

 indent
 
 URL
 

Function Documentation

◆ getRunsNewer()

def util.rrClient.getRunsNewer (   run,
  minLumis 
)

Definition at line 8 of file rrClient.py.

References createfilelist.int, and 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 
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
def getRunsNewer(run, minLumis)
Definition: rrClient.py:8

Variable Documentation

◆ indent

util.rrClient.indent

Definition at line 41 of file rrClient.py.

◆ URL

util.rrClient.URL

Definition at line 6 of file rrClient.py.