Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F8309918
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
View Options
diff --git a/scripts/dumpgenieconfig.py b/scripts/dumpgenieconfig.py
new file mode 100644
index 0000000..b5c98c3
--- /dev/null
+++ b/scripts/dumpgenieconfig.py
@@ -0,0 +1,35 @@
+from ROOT import TFile, TFolder, TObjString
+import sys
+
+def PrintKey(obj, indent):
+ splitkey = obj.GetName().split(";")
+ keydict = {}
+ for val in reversed(splitkey):
+ splitval = val.split(":")
+ if (len(splitval) < 2): splitval = val.split("=")
+ keydict[splitval[0].strip()] = ''.join(splitval[1:]).strip()
+
+ print indent, keydict
+
+def ExpandKeys(keydir, indent):
+ for obj in keydir.GetListOfFolders():
+ if "TFolder" in str(type(obj)):
+ print indent, obj.GetName()
+ ExpandKeys(obj, indent + " -> ")
+ if "TObjString" in str(type(obj)):
+ PrintKey(obj, indent )
+
+def ExpandGlobalList(keydir):
+ for obj in keydir.GetListOfFolders():
+ if str(obj.GetName()) != "GlobalParameterList": continue
+ print "GLOBAL : ", obj.GetName()
+ ExpandKeys(obj,"GLOBAL : ")
+
+if __name__=="__main__":
+
+ myfile = TFile(sys.argv[1],"READ")
+ configs = myfile.Get("gconfig")
+ ExpandKeys(configs,"")
+
+ print "\n# Global List #\n"
+ ExpandGlobalList(configs)
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sat, Dec 21, 4:53 PM (14 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4023537
Default Alt Text
(1 KB)
Attached To
rNUISANCEGIT nuisancegit
Event Timeline
Log In to Comment