Hi ROOTers,
I have an issue when i try to execute my program directly from the terminal. Actually, my script work if I use it from the root interface (when I do : root -l) but when I try to run it from the terminal (using "g++ -o Plotting_AlignmentFiles_Final Plotting_AlignmentFiles_Final.cc root-config --cflags --libs
" then ./Plotting_AlignmentFiles_Final Trans_Alignment_5710.dat) I have a big list of errors.
The errors are
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Info in TCanvas::Print: gif file PLOTS/XY_YZ_XZ_Channel_1.gif has been created
Warning in TCanvas::Constructor: Deleting canvas with same name: c1
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Info in TCanvas::Print: gif file PLOTS/XY_YZ_XZ_Channel_2.gif has been created
Warning in TCanvas::Constructor: Deleting canvas with same name: c1
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TPad::Range: illegal world coordinates range: x1=0.000000, y1=-0.000000, x2=0.000000, y2=0.000000
Error in TPad::RangeAxis: illegal axis coordinates range: xmin=0.000000, ymin=0.000000, xmax=0.000000, ymax=0.000000
Error in TPad::Range: illegal world coordinates range: x1=0.000000, y1=-12.500000, x2=0.000000, y2=12.500000
Error in TPad::RangeAxis: illegal axis coordinates range: xmin=0.000000, ymin=-10.000000, xmax=0.000000, ymax=10.000000
Error in TPad::Range: illegal world coordinates range: x1=0.000000, y1=-12.500000, x2=0.000000, y2=12.500000
Error in TPad::RangeAxis: illegal axis coordinates range: xmin=0.000000, ymin=-10.000000, xmax=0.000000, ymax=10.000000
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TPad::Range: illegal world coordinates range: x1=0.000000, y1=-12.500000, x2=0.000000, y2=12.500000
Error in TPad::RangeAxis: illegal axis coordinates range: xmin=0.000000, ymin=-10.000000, xmax=0.000000, ymax=10.000000
Info in TCanvas::Print: gif file PLOTS/XY_YZ_XZ_Channel_4.gif has been created
Warning in TCanvas::Constructor: Deleting canvas with same name: c1
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TPad::Range: illegal world coordinates range: x1=0.000000, y1=0.000000, x2=0.000000, y2=0.000000
Error in TPad::RangeAxis: illegal axis coordinates range: xmin=0.000000, ymin=0.000000, xmax=0.000000, ymax=0.000000
Error in TPad::Range: illegal world coordinates range: x1=0.000000, y1=-12.500000, x2=0.000000, y2=12.500000
Error in TPad::RangeAxis: illegal axis coordinates range: xmin=0.000000, ymin=-10.000000, xmax=0.000000, ymax=10.000000
Error in TPad::Range: illegal world coordinates range: x1=0.000000, y1=-12.500000, x2=0.000000, y2=12.500000
Error in TPad::RangeAxis: illegal axis coordinates range: xmin=0.000000, ymin=-10.000000, xmax=0.000000, ymax=10.000000
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TPad::Range: illegal world coordinates range: x1=0.000000, y1=-12.500000, x2=0.000000, y2=12.500000
Error in TPad::RangeAxis: illegal axis coordinates range: xmin=0.000000, ymin=-10.000000, xmax=0.000000, ymax=10.000000
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Info in TCanvas::Print: gif file PLOTS/XY_YZ_XZ_Channel_5.gif has been created
Warning in TCanvas::Constructor: Deleting canvas with same name: c1
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TPad::Range: illegal world coordinates range: x1=0.000000, y1=0.000000, x2=0.000000, y2=0.000000
Error in TPad::RangeAxis: illegal axis coordinates range: xmin=0.000000, ymin=0.000000, xmax=0.000000, ymax=0.000000
Error in TPad::Range: illegal world coordinates range: x1=0.000000, y1=-12.500000, x2=0.000000, y2=12.500000
Error in TPad::RangeAxis: illegal axis coordinates range: xmin=0.000000, ymin=-10.000000, xmax=0.000000, ymax=10.000000
Error in TPad::Range: illegal world coordinates range: x1=0.000000, y1=-12.500000, x2=0.000000, y2=12.500000
Error in TPad::RangeAxis: illegal axis coordinates range: xmin=0.000000, ymin=-10.000000, xmax=0.000000, ymax=10.000000
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Error in TGaxis::PaintAxis: length of axis is 0
Here is my script
for(int i=0;i<16;i++){
iloop=i*4;
for(int j=iloop;j<iloop+4;j++){
if(j==0) {continue;}
else if(j%4==0){continue;}
else {
if(j==1){
XG1[0]=x[j];
YG1[0]=y[j];
ZG1[0]=z[j];}
else if((j-1)%4==0){
XG1[0]=x[j];
YG1[0]=y[j];
ZG1[0]=z[j];}
else if(j==2){
XG2[0]=x[j];
YG2[0]=y[j];
ZG2[0]=z[j];}
else if((j-2)%4==0){
XG2[0]=x[j];
YG2[0]=y[j];
ZG2[0]=z[j];}
else if(j==3 || (j-3)%4==0){
XG3[0]=x[j];
YG3[0]=y[j];
ZG3[0]=z[j];}
//std::cout<<YG[0]<<std::endl;
//std::cout<<ZG[0]<<std::endl;
}
}
char title[64];
sprintf(title,"Channel_%i -- Plots XY / YZ / XZ",TitlePlot[i]);
TCanvas *c1 = new TCanvas("c1",title);
TPaveLabel* TitleG = new TPaveLabel(0.1,0.96,0.9,0.99,title);
TitleG->Draw();
TPad* c = new TPad("Graph","Graph",0.01,0.05,0.95,0.95);
c->Draw();
c->cd();
c->Divide(1,3);
TMultiGraph *CT1=new TMultiGraph();
TMultiGraph *CT2=new TMultiGraph();
TMultiGraph *CT3=new TMultiGraph();
c->cd(1); //First graph (X function of Y)
c->cd(1)->SetGrid();
TGraph *CT1_1=new TGraph(nbpts,XG1,YG1);
CT1_1->SetMarkerStyle(3);
CT1_1->SetMarkerSize(3);
CT1_1->SetMarkerColor(2);//Color for ROC 0
CT1->Add(CT1_1);
TGraph *CT1_2=new TGraph(nbpts,XG2,YG2);
CT1_2->SetMarkerStyle(3);
CT1_2->SetMarkerSize(3);
CT1_2->SetMarkerColor(3);//Color for ROC 1
CT1->Add(CT1_2);
TGraph *CT1_3=new TGraph(nbpts,XG3,YG3);
CT1_3->SetMarkerStyle(3);
CT1_3->SetMarkerSize(3);
CT1_3->SetMarkerColor(4);//Color for ROC 2
CT1->Add(CT1_3);
CT1->Draw("apl");
CT1->SetTitle("X function of Y");
gStyle->SetTitleFontSize(0.1);
CT1->GetXaxis()->SetRangeUser(-4.0,4.0);
CT1->GetXaxis()->SetTitle("X location (#mum)");
CT1->GetXaxis()->SetTitleSize(0.08);
CT1->GetXaxis()->SetTitleOffset(0.4);
CT1->GetYaxis()->SetRangeUser(-10.,10.);
CT1->GetYaxis()->SetTitle("Y location (#mum)");
CT1->GetYaxis()->SetTitleSize(0.08);
CT1->GetYaxis()->SetTitleOffset(0.2);
gPad->Update();
gPad->Modified();
TLegend* legend1 = new TLegend(1,0.9,0.9,0.5);
legend1->AddEntry(CT1_1,"ROC 0");
legend1->AddEntry(CT1_2,"ROC 1");
legend1->AddEntry(CT1_3,"ROC 2");
legend1->SetFillStyle(0);
legend1->Draw();
c->cd(2); //Second Graph (Y function of Z)
c->cd(2)->SetGrid();
TGraph *CT2_1=new TGraph(nbpts,YG1,ZG1);
CT2_1->SetMarkerStyle(3);
CT2_1->SetMarkerSize(3);
CT2_1->SetMarkerColor(2);
CT2->Add(CT2_1);
TGraph *CT2_2=new TGraph(nbpts,YG2,ZG2);
CT2_2->SetMarkerStyle(3);
CT2_2->SetMarkerSize(3);
CT2_2->SetMarkerColor(3);
CT2->Add(CT2_2);
TGraph *CT2_3=new TGraph(nbpts,YG3,ZG3);
CT2_3->SetMarkerStyle(3);
CT2_3->SetMarkerSize(3);
CT2_3->SetMarkerColor(4);
CT2->Add(CT2_3);
CT2->Draw("apl");
CT2->SetTitle("Y function of Z");
CT2->GetXaxis()->SetRangeUser(-4.0,4.0);
CT2->GetXaxis()->SetTitle("Y location (#mum)");
CT2->GetXaxis()->SetTitleSize(0.08);
CT2->GetXaxis()->SetTitleOffset(0.4);
CT2->GetYaxis()->SetRangeUser(-10.,10.);
CT2->GetYaxis()->SetTitle("Z location (#mum)");
CT2->GetYaxis()->SetTitleSize(0.08);
CT2->GetYaxis()->SetTitleOffset(0.2);
gPad->Update();
gPad->Modified();
TLegend* legend2 = new TLegend(1,0.9,0.9,0.5);
legend2->AddEntry(CT1_1,"ROC 0");
legend2->AddEntry(CT1_2,"ROC 1");
legend2->AddEntry(CT1_3,"ROC 2");
legend2->SetFillStyle(0);
legend2->Draw();
c->cd(3); //Third Graph (X function of Z)
c->cd(3)->SetGrid();
TGraph *CT3_1=new TGraph(nbpts,XG1,ZG1);
CT3_1->SetMarkerStyle(3);
CT3_1->SetMarkerSize(3);
CT3_1->SetMarkerColor(2);
CT3->Add(CT3_1);
TGraph *CT3_2=new TGraph(nbpts,XG2,ZG2);
CT3_2->SetMarkerStyle(3);
CT3_2->SetMarkerSize(3);
CT3_2->SetMarkerColor(3);
CT3->Add(CT3_2);
TGraph *CT3_3=new TGraph(nbpts,XG3,ZG3);
CT3_3->SetMarkerStyle(3);
CT3_3->SetMarkerSize(3);
CT3_3->SetMarkerColor(4);
CT3->Add(CT3_3);
CT3->Draw("apl");
CT3->SetTitle("X function of Z");
CT3->GetXaxis()->SetRangeUser(-4.0,4.0);
CT3->GetXaxis()->SetTitle("X location (#mum)");
CT3->GetXaxis()->SetTitleSize(0.08);
CT3->GetXaxis()->SetTitleOffset(0.4);
CT3->GetYaxis()->SetRangeUser(-10.,10.);
CT3->GetYaxis()->SetTitle("Z location (#mum)");
CT3->GetYaxis()->SetTitleSize(0.08);
CT3->GetYaxis()->SetTitleOffset(0.2);
gPad->Update();
gPad->Modified();
TLegend* legend3 = new TLegend(1,0.9,0.9,0.5);
legend3->AddEntry(CT1_1,"ROC 0");
legend3->AddEntry(CT1_2,"ROC 1");
legend3->AddEntry(CT1_3,"ROC 2");
legend3->SetFillStyle(0);
legend3->Draw();
//Sauvegarder le canvas et le vider pr le nouveau tour de boucle
c1->SaveAs(TString::Format("PLOTS/XY_YZ_XZ_Channel_%i.gif",TitlePlot[i]));
//delete legend3,legend1,legend2,TitleG,CT1,CT1_1,CT1_2,CT1_3,CT2,CT2_1,CT2_2,CT2_3,CT3,CT3_1,CT3_2,CT3_3,c1;
}//End of the 2nd for loop
I thank you by advance.