CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions | Variables
rrClient Namespace Reference

Functions

def getRunsNewer
 

Variables

string URL = "http://runregistry.web.cern.ch/runregistry/"
 

Function Documentation

def rrClient.getRunsNewer (   run,
  minLumis 
)

Definition at line 6 of file rrClient.py.

Referenced by getRunInfo.getRunsNewer().

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

Variable Documentation

string rrClient.URL = "http://runregistry.web.cern.ch/runregistry/"

Definition at line 4 of file rrClient.py.

Referenced by XrdStorageMaker.check(), XrdAdaptor::Source.getXrootdSiteFromURL(), XrdAdaptor::Source.isDCachePool(), SendMonitoringInfo(), and XrdStorageMaker.stagein().