26 std::cout <<
"Opening file: " << inFile1 << std::endl;
27 TFile inputFile1(inFile1.c_str());
28 std::cout <<
"Opening file: " << inFile2 << std::endl;
29 TFile inputFile2(inFile2.c_str());
30 std::cout <<
"Comparing Histograms: " << hist1Name <<
" & " << hist2Name
33 TH1F*
h1 = (TH1F*)inputFile1.Get(hist1Name.c_str());
34 TH1F*
h2 = (TH1F*)inputFile2.Get(hist2Name.c_str());
36 h1->SetLineColor(col1);
38 h2->SetLineColor(col2);
39 h2->DrawNormalized(
"same");
41 TLegend*
leg =
new TLegend(0.72, 0.71, 0.99, 0.95);
42 leg->AddEntry(h1, hist1Name.c_str());
43 leg->AddEntry(h2, hist2Name.c_str());