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: |
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: |
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)) |
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() |