File indexing completed on 2025-10-13 08:26:51
0001
0002
0003
0004 {
0005 gROOT->Reset();
0006
0007
0008
0009 TFile f = TFile("test02.root");
0010 auto c1 = new TCanvas("test02", "test02", 200, 10, 1200, 700);
0011 c1->Divide(4,2);
0012
0013 auto dir = (TDirectory*)f.Get("histo");
0014
0015 auto hist1 = (TH1D*)dir->Get("h1.1");
0016 c1->cd(1);
0017 hist1->Draw("HIST");
0018
0019 auto hist3 = (TH1D*)dir->Get("h1.3");
0020 c1->cd(2);
0021 hist3->Draw("HIST");
0022
0023 auto hist4 = (TH1D*)dir->Get("h1.4");
0024 c1->cd(3);
0025 hist4->Draw("HIST");
0026
0027 auto hist5 = (TH2D*)dir->Get("h2.1");
0028 c1->cd(5);
0029 hist5->Draw("HIST");
0030
0031 auto hist8 = (TH2D*)dir->Get("h2.4");
0032 c1->cd(6);
0033 hist8->Draw("HIST");
0034 }