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

◆ getPSetDict()

def HipPyOptionParser.getPSetDict (   thePSet)

Definition at line 10 of file HipPyOptionParser.py.

10 def getPSetDict(thePSet):
11  return thePSet.parameters_()
12 

Referenced by insertPSetToPSet().

◆ insertPSetToPSet()

def HipPyOptionParser.insertPSetToPSet (   inPSet,
  outPSet 
)

Definition at line 16 of file HipPyOptionParser.py.

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

References getPSetDict(), and insertValToPSet().

◆ insertPSetToVPSet()

def HipPyOptionParser.insertPSetToVPSet (   inPSet,
  outVPSet 
)

Definition at line 20 of file HipPyOptionParser.py.

20 def insertPSetToVPSet(inPSet, outVPSet):
21  outVPSet.append(inPSet)
22 
23 

Referenced by mergeVPSets().

◆ insertValToPSet()

def HipPyOptionParser.insertValToPSet (   name,
  val,
  thePSet 
)

Definition at line 13 of file HipPyOptionParser.py.

13 def insertValToPSet(name,val,thePSet):
14  setattr(thePSet,name,val)
15 

Referenced by insertPSetToPSet().

◆ isGoodEntry()

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 

◆ matchPSetsByRecord()

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 

◆ mergeVPSets()

def HipPyOptionParser.mergeVPSets (   inVPSet,
  overrideVPSet,
  matchrule = None 
)

Definition at line 32 of file HipPyOptionParser.py.

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 

References insertPSetToVPSet().

◆ parseBoolString()

def HipPyOptionParser.parseBoolString (   theString)

Definition at line 48 of file HipPyOptionParser.py.

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

References pileupCalc.upper.

HipPyOptionParser.mergeVPSets
def mergeVPSets(inVPSet, overrideVPSet, matchrule=None)
Definition: HipPyOptionParser.py:32
HipPyOptionParser.insertValToPSet
def insertValToPSet(name, val, thePSet)
Definition: HipPyOptionParser.py:13
HipPyOptionParser.insertPSetToVPSet
def insertPSetToVPSet(inPSet, outVPSet)
Definition: HipPyOptionParser.py:20
HipPyOptionParser.insertPSetToPSet
def insertPSetToPSet(inPSet, outPSet)
Definition: HipPyOptionParser.py:16
HipPyOptionParser.matchPSetsByRecord
def matchPSetsByRecord(ps1, ps2)
Definition: HipPyOptionParser.py:24
HipPyOptionParser.getPSetDict
def getPSetDict(thePSet)
Definition: HipPyOptionParser.py:10
pileupCalc.upper
upper
Definition: pileupCalc.py:214
HipPyOptionParser.parseBoolString
def parseBoolString(theString)
Definition: HipPyOptionParser.py:48
HipPyOptionParser.isGoodEntry
def isGoodEntry(var)
Definition: HipPyOptionParser.py:51