CMS 3D CMS Logo

Functions
queryRR Namespace Reference

Functions

def queryRR (firstRun, lastRun, groupName)
 

Function Documentation

◆ queryRR()

def queryRR.queryRR (   firstRun,
  lastRun,
  groupName 
)

Definition at line 10 of file queryRR.py.

10 def queryRR(firstRun,lastRun,groupName):
11  rrurl = "http://runregistry.web.cern.ch/runregistry/"
12  stderr.write("Querying run registry for range [%d, %d], group name like %s ...\n" % (firstRun, lastRun, groupName))
13  server = RRApi(rrurl)
14  mycolumns = ['number', 'hltKeyDescription', 'runClassName']
15  run_data = server.data(workspace = 'GLOBAL', table = 'runsummary', template = 'xml', columns = mycolumns, filter = {'datasetExists': '= true', 'number':'>= %d and <= %d'%(firstRun,lastRun), 'runClassName':"like '%%%s%%'"%groupName})
16  ret = {}
17  xml_data = xml.dom.minidom.parseString(run_data)
18  xml_runs = xml_data.documentElement.getElementsByTagName("RunSummaryRowGlobal")
19  for xml_run in xml_runs:
20  ret[xml_run.getElementsByTagName("number")[0].firstChild.nodeValue] = xml_run.getElementsByTagName("hltKeyDescription")[0].firstChild.nodeValue
21  return ret
queryRR.queryRR
def queryRR(firstRun, lastRun, groupName)
Definition: queryRR.py:10