CMS 3D CMS Logo

Classes | Functions
HipPyOptionParser Namespace Reference

Classes

class  HipPyOptionParser
 

Functions

def getPSetDict (thePSet)
 
def insertPSetToPSet (inPSet, outPSet)
 
def insertPSetToVPSet (inPSet, outVPSet)
 
def insertValToPSet (name, val, thePSet)
 
def isGoodEntry (var)
 
def matchPSetsByRecord (ps1, ps2)
 
def mergeVPSets (inVPSet, overrideVPSet, matchrule=None)
 
def parseBoolString (theString)
 

Function Documentation

def HipPyOptionParser.getPSetDict (   thePSet)

Definition at line 8 of file HipPyOptionParser.py.

Referenced by insertPSetToPSet().

8 def getPSetDict(thePSet):
9  return thePSet.parameters_()
10 
def getPSetDict(thePSet)
def HipPyOptionParser.insertPSetToPSet (   inPSet,
  outPSet 
)

Definition at line 14 of file HipPyOptionParser.py.

References getPSetDict(), and insertValToPSet().

14 def insertPSetToPSet(inPSet, outPSet):
15  for key,val in getPSetDict(inPSet).iteritems():
16  insertValToPSet(key,val,outPSet)
17 
def insertPSetToPSet(inPSet, outPSet)
def getPSetDict(thePSet)
def insertValToPSet(name, val, thePSet)
def HipPyOptionParser.insertPSetToVPSet (   inPSet,
  outVPSet 
)

Definition at line 18 of file HipPyOptionParser.py.

Referenced by mergeVPSets().

18 def insertPSetToVPSet(inPSet, outVPSet):
19  outVPSet.append(inPSet)
20 
21 
def insertPSetToVPSet(inPSet, outVPSet)
def HipPyOptionParser.insertValToPSet (   name,
  val,
  thePSet 
)

Definition at line 11 of file HipPyOptionParser.py.

Referenced by insertPSetToPSet().

11 def insertValToPSet(name,val,thePSet):
12  setattr(thePSet,name,val)
13 
def insertValToPSet(name, val, thePSet)
def HipPyOptionParser.isGoodEntry (   var)

Definition at line 49 of file HipPyOptionParser.py.

49 def isGoodEntry(var):
50  if (var is None):
51  return False
52  elif (var == []):
53  return False
54  else:
55  return True
56 
57 
def HipPyOptionParser.matchPSetsByRecord (   ps1,
  ps2 
)

Definition at line 22 of file HipPyOptionParser.py.

22 def matchPSetsByRecord(ps1, ps2):
23  if hasattr(ps1,"record") and hasattr(ps2,"record"):
24  s1=ps1.record.value()
25  s2=ps2.record.value()
26  return (s1==s2)
27  return False
28 
29 
def matchPSetsByRecord(ps1, ps2)
def HipPyOptionParser.mergeVPSets (   inVPSet,
  overrideVPSet,
  matchrule = None 
)

Definition at line 30 of file HipPyOptionParser.py.

References insertPSetToVPSet().

30 def mergeVPSets(inVPSet, overrideVPSet, matchrule=None):
31  resvpset=overrideVPSet.copy()
32  for iop in inVPSet.value():
33  nomatch=True
34  if matchrule is not None:
35  for cps in overrideVPSet.value():
36  if matchrule(cps,iop):
37  nomatch=False
38  break
39  if nomatch:
40  insertPSetToVPSet(iop,resvpset)
41  return resvpset
42 
43 
44 
45 
def mergeVPSets(inVPSet, overrideVPSet, matchrule=None)
def insertPSetToVPSet(inPSet, outVPSet)
def HipPyOptionParser.parseBoolString (   theString)

Definition at line 46 of file HipPyOptionParser.py.

References pfDeepBoostedJetPreprocessParams_cfi.upper.

46 def parseBoolString(theString):
47  return theString[0].upper()=='T'
48 
def parseBoolString(theString)