9 return [key.GetName()
for key
in gDirectory.GetListOfKeys()]
10 TFile.GetKeyNames = GetKeyNames
14 print "Too few arguments. Expected the following:"
15 print " 1. Input file"
16 print " 2. Output file"
17 print " 3+ Name(s) of components to extract"
20 inputFile = TFile.Open(sys.argv[1],
"READ")
21 outputFile = TFile.Open(sys.argv[2],
"RECREATE")
22 compNames = sys.argv[3:]
25 for compName
in compNames:
26 if compName
not in inputFile.GetKeyNames():
27 print "Unable to continue - input file does not contain the requested component:",compName
31 for compName
in compNames:
32 hist = inputFile.Get(compName)