CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_6/src/PhysicsTools/PythonAnalysis/python/namespaceDict.py

Go to the documentation of this file.
00001 """parsing the LCGDict namespace and build dictionary
00002 (quick'n'dirty solution)
00003 
00004 benedikt.hegner@cern.ch
00005 
00006 """
00007 
00008 import popen2
00009 import string
00010 
00011 def getNamespaceDict():
00012 
00013   # execute SealPluginDump to get list of plugins
00014   process = popen2.Popen3('SealPluginDump')
00015   output = process.fromchild.read()
00016 
00017   namespaceDict = {}
00018 
00019   for line in output.split('\n'):
00020     # search for Reflex, global namespace and non templates
00021     if line.find('Reflex') !=-1 and line.find(':') ==-1 and line.find('<') ==-1:
00022       className = line.replace('LCGReflex/', '').strip()
00023       namespaceDict[className] = line.strip()
00024     
00025   return namespaceDict