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

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

Referenced by insertPSetToPSet().

◆ insertPSetToPSet()

def HipPyOptionParser.insertPSetToPSet (   inPSet,
  outPSet 
)

Definition at line 15 of file HipPyOptionParser.py.

15 def insertPSetToPSet(inPSet, outPSet):
16  for key,val in getPSetDict(inPSet.items()):
17  insertValToPSet(key,val,outPSet)
18 

References getPSetDict(), and insertValToPSet().

◆ insertPSetToVPSet()

def HipPyOptionParser.insertPSetToVPSet (   inPSet,
  outVPSet 
)

Definition at line 19 of file HipPyOptionParser.py.

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

Referenced by mergeVPSets().

◆ insertValToPSet()

def HipPyOptionParser.insertValToPSet (   name,
  val,
  thePSet 
)

Definition at line 12 of file HipPyOptionParser.py.

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

Referenced by insertPSetToPSet().

◆ isGoodEntry()

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 

◆ matchPSetsByRecord()

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 

◆ mergeVPSets()

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

Definition at line 31 of file HipPyOptionParser.py.

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 

References insertPSetToVPSet().

◆ parseBoolString()

def HipPyOptionParser.parseBoolString (   theString)

Definition at line 47 of file HipPyOptionParser.py.

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

References pileupCalc.upper.

HipPyOptionParser.mergeVPSets
def mergeVPSets(inVPSet, overrideVPSet, matchrule=None)
Definition: HipPyOptionParser.py:31
HipPyOptionParser.insertValToPSet
def insertValToPSet(name, val, thePSet)
Definition: HipPyOptionParser.py:12
HipPyOptionParser.insertPSetToVPSet
def insertPSetToVPSet(inPSet, outVPSet)
Definition: HipPyOptionParser.py:19
HipPyOptionParser.insertPSetToPSet
def insertPSetToPSet(inPSet, outPSet)
Definition: HipPyOptionParser.py:15
HipPyOptionParser.matchPSetsByRecord
def matchPSetsByRecord(ps1, ps2)
Definition: HipPyOptionParser.py:23
HipPyOptionParser.getPSetDict
def getPSetDict(thePSet)
Definition: HipPyOptionParser.py:9
pileupCalc.upper
upper
Definition: pileupCalc.py:213
HipPyOptionParser.parseBoolString
def parseBoolString(theString)
Definition: HipPyOptionParser.py:47
HipPyOptionParser.isGoodEntry
def isGoodEntry(var)
Definition: HipPyOptionParser.py:50