CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
queryRR Namespace Reference

Functions

def queryRR
 

Function Documentation

def queryRR.queryRR (   firstRun,
  lastRun,
  groupName 
)

Definition at line 10 of file queryRR.py.

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