CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 54 of file makeHLTPrescaleTable.py.

Referenced by getProcessObjectFromConfDB().

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

Definition at line 66 of file makeHLTPrescaleTable.py.

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

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