34 void laser_2d_opt(TString a,
char *opt)
36 cout<<
"a = "<<a<<
" opt "<<opt<<endl;
37 TCanvas *c1 =
new TCanvas(
"c1",
"ps",200,10,700,500);
38 gStyle->SetPalette(1);
39 gStyle->SetOptStat(0);
42 TH2F *hr =
new TH2F(
"hr",
"",12,-0.55,0.65,12,-0.45,0.75);
43 hr->GetYaxis()->SetTitle(
"#Delta Ar [%]");
44 hr->GetXaxis()->SetTitle(
"#Delta t_{0}");
45 TH2F *hr2 =
new TH2F(
"hr2",
"Residual x",12,-0.55,0.65,12,-0.45,0.75);
46 hr2->GetYaxis()->SetTitle(
"#Delta Ar [%]");
47 hr2->GetXaxis()->SetTitle(
"#Delta t_{0}");
48 TH2F *hr3 =
new TH2F(
"hr3",
"Residual y",12,-0.55,0.65,12,-0.45,0.75);
49 hr3->GetYaxis()->SetTitle(
"#Delta Ar [%]");
50 hr3->GetXaxis()->SetTitle(
"#Delta t_{0}");
51 TH2F *hr4 =
new TH2F(
"hr4",
"Residual radius",12,-0.55,0.65,12,-0.45,0.75);
52 hr4->GetYaxis()->SetTitle(
"#Delta Ar [%]");
53 hr4->GetXaxis()->SetTitle(
"#Delta t_{0}");
54 TH2F *hr5 =
new TH2F(
"hr5",
"Residual phi",12,-0.55,0.65,12,-0.45,0.75);
55 hr5->GetYaxis()->SetTitle(
"#Delta Ar [%]");
56 hr4->GetXaxis()->SetTitle(
"#Delta t_{0}");
64 FILE *file1=fopen (
"res.log",
"r");
68 float resx,resy,resrad,resphi, t0, gas, T, c2,rad1,rad11, rad2, rad21, rad3, rad31, err;
72 datab1 = fscanf(file1,
"%f %f %f %f %f",&t0,&gas,&T,&resx,&c2);
73 datab1 = fscanf(file1,
"%f %f %f %f %f",&t0,&gas,&T,&resy,&c2);
74 datab1 = fscanf(file1,
"%f %f %f %f %f",&t0,&gas,&T,&resrad,&c2);
75 datab1 = fscanf(file1,
"%f %f %f %f %f",&t0,&gas,&T,&resphi,&c2);
76 datab1 = fscanf(file1,
"%f %f %f %f %f",&t0,&gas,&T,&rad1,&err);
77 datab1 = fscanf(file1,
"%f %f %f %f",&t0,&gas,&T,&rad11);
78 datab1 = fscanf(file1,
"%f %f %f %f %f",&t0,&gas,&T,&rad2,&err);
79 datab1 = fscanf(file1,
"%f %f %f %f",&t0,&gas,&T,&rad21);
80 datab1 = fscanf(file1,
"%f %f %f %f %f",&t0,&gas,&T,&rad3,&err);
81 datab1 = fscanf(file1,
"%f %f %f %f",&t0,&gas,&T,&rad31);
82 if (feof(file1))
break;
86 hr->Fill(t0,gas,resx);
101 hr->Fill(t0,gas,resy);
103 hr->Fill(t0,gas,resrad);
105 hr->Fill(t0,gas,resphi);
107 hr->Fill(t0,gas,(
float) c2);
109 hr->Fill(t0,gas,rad3-28.56);
113 hr2->Fill(t0,gas,resx);
114 hr3->Fill(t0,gas,resy);
115 hr4->Fill(t0,gas,resrad);
116 hr5->Fill(t0,gas,resphi);
119 {cout<<
"Funktion nicht vorhanden !"<<endl;
break;}
140 if (fclose(file1) != 0)
141 cout<<
"Datei nicht geschlossen !"<<endl;