Dear all,
as also reported in
there are some problems in the extended examples with the macro root files named plotHisto.C
.
In particular, I would like to plot the histograms of the gps examples in examples/extended/eventgenerator/exgps
for the beam source defined in the test30.mac
macro.
I tried to correct the errors reported in Root error: call to deleted constructor of 'TFile' by writing the script of the plotHisto.C
macro as follow:
{
gROOT->Reset();
// Draw histos filled by Geant4 simulation
//
//TFile f = TFile("test02.root");
TFile f("build/test30.root");
TCanvas* c1 = new TCanvas("c1", " ");
//TDirectory* dir = (TDirectory*)f.Get("histo");
TH1D* hist1 = (TH1D*)f.Get("h1.1");
hist1->Draw("HIST");
/*
TH1D* hist2 = (TH1D*)dir->Get("h1.2");
hist2->Draw("HIST");
*/
TH1D* hist3 = (TH1D*)f.Get("h1.3");
hist3->Draw("HIST");
TH1D* hist4 = (TH1D*)f.Get("h1.4");
hist4->Draw("HIST");
TH2D* hist5 = (TH2D*)f.Get("h2.1");
hist5->Draw("HIST");
/*
TH2D* hist6 = (TH2D*)f.Get("h2.2");
hist6->Draw("HIST");
TH2D* hist7 = (TH2D*)dir->Get("h2.3");
hist7->Draw("HIST");
*/
TH2D* hist8 = (TH2D*)f.Get("h2.4");
hist8->Draw("HIST");
}
Unfortunately, I still having the following error messages when I run plotHisto.C
with ROOT:
I have to say that I am a beginner with ROOT but I would ask, please, if someone has some suggestions for this specific problem with the Geant4 examples.
Thanks in advance for your time.
Best regards,
Christian