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 55 of file makeHLTPrescaleTable.py.

Referenced by getProcessObjectFromConfDB().

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

Definition at line 67 of file makeHLTPrescaleTable.py.

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

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