16 if not dirName.endswith(
"/"):
17 dirName = dirName +
"/"
21 rootFileList =
sorted(glob.glob(dirName+
"*.root"))
22 if len(rootFileList) != 1:
23 print "Directory contains multiple or no root files - was expecting one:",dirName
25 rootFile = TFile(rootFileList[0],
"READ")
28 for aJetDef
in jetDefs:
32 for aSystName
in SystematicNames:
33 systematicName = aSystName +
"_" + aJetDef
34 histo = rootFile.Get(systematicName)
36 print "Failed to get histogram:",systematicName
40 histos[aJetDef][aSystName] = histo