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 9 of file HipPyOptionParser.py.

Referenced by insertPSetToPSet().

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

Definition at line 15 of file HipPyOptionParser.py.

References getPSetDict(), and insertValToPSet().

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

Definition at line 19 of file HipPyOptionParser.py.

Referenced by mergeVPSets().

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

Definition at line 12 of file HipPyOptionParser.py.

Referenced by insertPSetToPSet().

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

Definition at line 50 of file HipPyOptionParser.py.

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

Definition at line 23 of file HipPyOptionParser.py.

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

Definition at line 31 of file HipPyOptionParser.py.

References insertPSetToVPSet().

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

Definition at line 47 of file HipPyOptionParser.py.

References pileupCalc.upper.

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