Exemple #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
Exemple #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
Exemple #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)
Exemple #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)
Exemple #5
0
exlist = replace(exlist, ">", "\>")
skipme = re.compile(exlist)

# read classes to include that are not included automatically
inclusionlist = []
inlistfile = "plugins/inclusionlist.txt"
if os.path.exists(inlistfile):
	inclusionlist = map(strip, split(strip(open(inlistfile).read()), '\n'))
#------------------------------------------------------------------------------
argv = sys.argv[1:]
argc = len(argv)

# Construct list of directories to be searched from 
# the contents of classmap.py

values = ClassToHeaderMap.values()
values.sort()
records = {}
for value in values:
	t = split(value, "/interface/")
	records[t[0]] = 0
records = records.keys()
records.sort()

# Get list of classes from classes_def.xml
# Assume that those bounded by Wrappers are the
# ones that can potentially be stored in a Root file

wclasses = []
for record in records:
	xmlfile = "%s/%s/src/classes_def.xml" % (LOCALBASE, record)
Exemple #6
0

#------------------------------------------------------------------------------
argv = sys.argv[1:]
argc = len(argv)

# Construct list of directories to be searched from
# the contents of classmap.py, but if classlist_default.txt
# exists, use the classes list therein

classlist_default = '%s/plugins/classlist_default.txt' % PWD
if os.path.exists(classlist_default):
    print "\n\t=== using classes in plugins/classlist_default.txt ===\n"
    wclasses = map(strip, open(classlist_default).readlines())
else:
    values = ClassToHeaderMap.values()
    values.sort()

    records = {}
    for value in values:
        t = split(value, "/interface/")
        records[t[0]] = 0
    records = records.keys()
    records.sort()

    # Get list of classes from classes_def*.xml
    # Assume that those bounded by Wrappers are the
    # ones that can potentially be stored in a Root file

    wclassesmap = {}
    count = 0