278 Main function to be executed when starting the code.
281 parser = argparse.ArgumentParser( description =
'Distribution Plotter' )
282 parser.add_argument(
'-s',
'--structDirs', default =
True, action =
"store_true", help =
' if true, it creates directories following the same structure as in the root file to store the pdf plots')
283 parser.add_argument(
'-r',
'--reference', help =
'The reference' )
284 parser.add_argument(
'-t',
'--test', help =
'The test' )
285 parser.add_argument(
'-t2',
'--test2', default =
'', help =
'The additional test' )
286 parser.add_argument(
'-d',
'--directory', default =
"/", help =
'Print cutflow fror systematic variations' )
287 parser.add_argument(
'-e',
'--exclude', default =
"_bin_", help =
'histograms whose names contain the provided strings are not examined')
288 parser.add_argument(
'-n',
'--normalize', default =
False, action =
"store_true", help =
'normalize histograms with larger stats for better comparison')
289 parser.add_argument(
'-l',
'--labels', default =
'', help =
'Add text to legend for ref/test/test2, split with commas' )
291 args = parser.parse_args()
295 ROOT.gROOT.SetBatch()
297 ROOT.gROOT.LoadMacro(
"./AtlasStyle.C")
298 ROOT.TH1.SetDefaultSumw2(ROOT.kTRUE)
303 if args.labels
is '':
304 LABELS = [
'Ref',
'Test' ]
305 if args.test2
is not '':
306 LABELS.append(
'Test2' )
308 LABELS = args.labels.split(
",")
315 validator =
Validator( args.structDirs, args.exclude, SameHist, args.normalize )
317 allFiles = [ os.path.abspath(args.reference), os.path.abspath(args.test) ]
319 allFiles = [ os.path.abspath(args.reference), os.path.abspath(args.test), os.path.abspath(args.test2) ]