Beispiel #1
0
def findHeaders(name):
    hdrs = {}
    pkgs = {}
    # break name into words, but skip fundamental types
    # and the main STL types
    words = getwords.findall(name)
    classlist = []
    for word in words:
        if isfun.match(word) != None:
            continue
        elif isSTL.match(word) != None:
            continue
        else:
            if not word in classlist:
                classlist.append(word)

    # for each word, scan the header map for a header file
    headers = []
    skipme = False
    for cname in classlist:
        # Find associated header
        if ClassToHeaderMap.has_key(cname):
            header = ClassToHeaderMap[cname]
            if type(header) == type([]): header = header[0]
            if not header in headers:
                headers.append(header)
        elif isfun.match(cname) != None:
            continue
    return headers
Beispiel #2
0
def findHeaders(name):
	hdrs = {}
	pkgs = {}
	# break name into words, but skip fundamental types
	# and the main STL types
	words = getwords.findall(name)
	classlist = []
	for word in words:
		if isfun.match(word) != None:
			continue
		elif isSTL.match(word) != None:
			continue
		else:
			if not word in classlist:
				classlist.append(word)

	# for each word, scan the header map for a header file
	headers = []
	skipme = False
	for cname in classlist:
		# Find associated header
		if ClassToHeaderMap.has_key(cname):
			header = ClassToHeaderMap[cname]
			if type(header) == type([]): header = header[0]
			if not header in headers:
				headers.append(header)
		elif isfun.match(cname) != None:
			continue
	return headers
Beispiel #3
0
def loadLibrary(name):
    ## 	if len(LOADED_LIBS) == 0:
    ## 		import PhysicsTools.TheNtupleMaker.AutoLoader
    ## 		LOADED_LIBS[name] = 1
    ## 		return
    name = fixName(name)  # remove unnecessary spaces

    if not ClassToHeaderMap.has_key(name): return

    # construct library name from header:
    # lib<subsystem><package>

    library = "lib%s%s" % tuple(split(ClassToHeaderMap[name], '/')[:2])

    if LOADED_LIBS.has_key(library): return

    LOADED_LIBS[library] = 0

    try:
        gSystem.Load(library)
    except:
        print "** failed to load %s for %s" % (library, name)
Beispiel #4
0
def loadLibrary(name):
## 	if len(LOADED_LIBS) == 0:
## 		import PhysicsTools.TheNtupleMaker.AutoLoader
## 		LOADED_LIBS[name] = 1
## 		return
	name = fixName(name) # remove unnecessary spaces

	if not ClassToHeaderMap.has_key(name): return

	# construct library name from header:
	# lib<subsystem><package>
	
	library = "lib%s%s" % tuple(split(ClassToHeaderMap[name],'/')[:2])
	
	if LOADED_LIBS.has_key(library): return
	
	LOADED_LIBS[library] = 0

	try:
		gSystem.Load(library)
	except:
		print "** failed to load %s for %s" % (library, name)