ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/OSUT3Analysis/Configuration/scripts/makeSinglePlot.py
(Generate patch)

Comparing UserCode/OSUT3Analysis/Configuration/scripts/makeSinglePlot.py (file contents):
Revision 1.8 by lantonel, Tue Mar 19 18:42:15 2013 UTC vs.
Revision 1.9 by lantonel, Tue Mar 26 14:03:02 2013 UTC

# Line 27 | Line 27 | parser.add_option("--line-width", dest="
27   (arguments, args) = parser.parse_args()
28  
29   if arguments.localConfig:
30 <    sys.path.append(os.getcwd())
30 >    sys.path.insert(0,os.getcwd())
31      exec("from " + arguments.localConfig.rstrip('.py') + " import *")
32 +    print arguments.localConfig.rstrip('.py')
33  
34   outputFileName = "simple_plot.root"
35   if arguments.outputFileName:
# Line 65 | Line 66 | gROOT.ForceStyle()
66  
67   outputFile = TFile(outputFileName, "RECREATE")
68  
68
69   datasets_needed = []
70   for histogram in input_histograms:
71      if histogram['dataset'] not in datasets_needed:
# Line 73 | Line 73 | for histogram in input_histograms:
73  
74   weight = intLumi / 10000.0
75   for dataset in datasets_needed:
76 +
77      dataset_file = "%s/%s.root" % (condor_dir,dataset)
78      if types[dataset] != "data":
79          os.system("mergeTFileServiceHistograms -i %s -o %s -w %g" % (dataset_file, dataset_file + "_tmp", weight))
# Line 99 | Line 100 | for histogram in input_histograms:
100      if inputFile.IsZombie() or not inputFile.GetNkeys():
101          continue
102      
102    print "OSUAnalysis/"+histogram['channel']+"/"+histogram['name']
103      Histogram = inputFile.Get("OSUAnalysis/"+histogram['channel']+"/"+histogram['name']).Clone()
104      Histogram.SetDirectory(0)
105      inputFile.Close()

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines