CMS 3D CMS Logo

Functions
makeHLTPrescaleTable Namespace Reference

Functions

def getPrescaleTableFromProcessObject (process)
 
def getProcessObjectFromConfDB (hlt_key)
 

Function Documentation

def makeHLTPrescaleTable.getPrescaleTableFromProcessObject (   process)
returns a dict of hlt key to vector of prescales
mapping 

Definition at line 56 of file makeHLTPrescaleTable.py.

Referenced by getProcessObjectFromConfDB().

57  """ returns a dict of hlt key to vector of prescales
58  mapping """
59 
60  retval = {}
61  for entry in process.PrescaleService.prescaleTable:
62  retval[entry.pathName.value()] = entry.prescales.value()
63 
64  return retval
65 
66 #----------------------------------------------------------------------
67 
def getPrescaleTableFromProcessObject(process)
def makeHLTPrescaleTable.getProcessObjectFromConfDB (   hlt_key)

Definition at line 68 of file makeHLTPrescaleTable.py.

References cmsRelvalreport.exit, reco.get(), getPrescaleTableFromProcessObject(), join(), edm.print(), and str.

69  # print >> stderr,"\t%s ..." % hlt_key
70  cmd = "edmConfigFromDB --orcoff --configName " + hlt_key
71  # print >> stderr, "cmd=",cmd
72  res = commands.getoutput(cmd)
73 
74  # potentially dangerous: we're running python code here
75  # which we get from an external process (confDB).
76  # we trust that there are no file deletion commands
77  # in the HLT configurations...
78 
79  # for some keys, edmConfigFromDB seems to produce error messages.
80  # just return None in this case
81  try:
82  exec(res)
83  except:
84  return None
85 
86  return process
87 
88 #----------------------------------------------------------------------
def getProcessObjectFromConfDB(hlt_key)