64 def getObjectList (objectName, base, verbose = False, memberData = False):
65 """Get a list of interesting things from this object"""
69 rootObjConstructor = getattr (ROOT, objectName)
70 except AttributeError
as missingAttr:
71 if str(missingAttr)
in [
'double',
'int']:
72 print "Do not need to describe doubles or ints"
77 obj = rootObjConstructor()
78 alreadySeenFunction = set()
79 vetoedFunction = set()
80 etaFound, phiFound =
False,
False
84 classList = [ ROOT.TClass.GetClass(objectName) ]
85 if verbose:
print classList
88 alreadySeenFunction.update(vetoedFunction)
89 vetoedFunction.clear()
90 oneclass = classList.pop (0)
91 print "Looking at %s" % oneclass.GetName ()
92 bases = oneclass.GetListOfBases()
93 funcs = oneclass.GetListOfMethods()
95 print "baseSize", bases.GetSize()
96 print "FunctionMemberSize", funcs.GetSize()
97 for baseIndex
in range( bases.GetSize() ) :
98 classList.append( bases.At(baseIndex).GetClassPointer() )
99 for index
in range( funcs.GetSize() ):
100 funcMember = funcs.At (index)
102 name = funcMember.GetName()
109 if name
in alreadySeenFunction:
112 returnType = funcMember.GetReturnTypeName()
113 goType = root2GOtypeDict.get (returnType,
None)
115 print " type", returnType, goType
117 vetoedTypes.add (returnType)
125 if funcMember.Property() & ROOT.kIsConstMethod
and not funcMember.GetNargs():
126 retval.append( (
"%s.%s()" % (base, name), goType))
127 alreadySeenFunction.add( name )
131 vetoedFunction.add( name )
133 print " failed IsConst() and GetNargs()"
136 dataList = oneclass.GetListOfDataMembers()
137 for index
in range( dataList.GetSize() ):
138 data = dataList.At( index );
139 name = data.GetName()
140 dataType = data.GetTypeName()
141 goType = root2GOtypeDict.get (dataType,
None)
145 print "name", name,
"dataType", dataType,
"goType", goType
146 retval.append ( (
"%s.%s" % (base, name), goType) )
148 return retval, etaFound
and phiFound