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

Referenced by insertPSetToPSet().

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

Definition at line 16 of file HipPyOptionParser.py.

References getPSetDict(), and insertValToPSet().

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

Definition at line 20 of file HipPyOptionParser.py.

Referenced by mergeVPSets().

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

Definition at line 13 of file HipPyOptionParser.py.

Referenced by insertPSetToPSet().

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

Definition at line 51 of file HipPyOptionParser.py.

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

Definition at line 24 of file HipPyOptionParser.py.

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

Definition at line 32 of file HipPyOptionParser.py.

References insertPSetToVPSet().

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

Definition at line 48 of file HipPyOptionParser.py.

References pileupCalc.upper.

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