241 |
|
for sample in processed_datasets: # loop over different samples as listed in configurationOptions.py |
242 |
|
dataset_file = "%s/%s.root" % (condor_dir,sample) |
243 |
|
inputFile = TFile(dataset_file) |
244 |
< |
Histogram = inputFile.Get(pathToDir+"/"+histogramName).Clone() |
244 |
> |
HistogramObj = inputFile.Get(pathToDir+"/"+histogramName) |
245 |
> |
if not HistogramObj: |
246 |
> |
print "WARNING: Could not find histogram " + pathToDir + "/" + histogramName + " in file " + dataset_file + ". Will skip it and continue." |
247 |
> |
return |
248 |
> |
Histogram = HistogramObj.Clone() |
249 |
|
Histogram.SetDirectory(0) |
250 |
|
inputFile.Close() |
251 |
|
if arguments.rebinFactor: |