Plot labeling added and fixed.
This commit is contained in:
parent
e393bc0288
commit
a1dad1c0c0
@ -23,6 +23,7 @@ void plotFrc(char *FileName)
|
||||
Int_t ntokens = 0;
|
||||
Int_t i = 0;
|
||||
Int_t nline=0;
|
||||
Int_t intNorm=0;
|
||||
Ssiz_t pos;
|
||||
Double_t x[100],yl1[100],yl2[100],yl3[100],yl4[100],yl5[100],yl6[100],yl7[100],bck[100];
|
||||
Int_t Flag[7]=0;
|
||||
@ -58,42 +59,66 @@ void plotFrc(char *FileName)
|
||||
strtoken = (TObjString*) token->At(6);
|
||||
label = strtoken->GetName();
|
||||
bck[i] = label.Atof();
|
||||
if (bck[i]>0) { Flag[7]=1;}
|
||||
if (bck[i]>0) {
|
||||
Flag[7]=1;
|
||||
intNorm = intNorm++;
|
||||
}
|
||||
|
||||
strtoken = (TObjString*) token->At(10);
|
||||
label = strtoken->GetName();
|
||||
yl1[i] = label.Atof();
|
||||
if (yl1[i]>0) { Flag[0]=1;}
|
||||
if (yl1[i]>0) {
|
||||
Flag[0]=1;
|
||||
intNorm = intNorm++;
|
||||
}
|
||||
|
||||
strtoken = (TObjString*) token->At(11);
|
||||
label = strtoken->GetName();
|
||||
yl2[i] = label.Atof();
|
||||
if (yl2[i]>0) { Flag[1]=1;}
|
||||
if (yl2[i]>0) {
|
||||
Flag[1]=1;
|
||||
intNorm = intNorm++;
|
||||
}
|
||||
|
||||
strtoken = (TObjString*) token->At(12);
|
||||
label = strtoken->GetName();
|
||||
yl3[i] = label.Atof();
|
||||
if (yl3[i]>0) { Flag[2]=1;}
|
||||
if (yl3[i]>0) {
|
||||
Flag[2]=1;
|
||||
intNorm = intNorm++;
|
||||
}
|
||||
|
||||
strtoken = (TObjString*) token->At(13);
|
||||
label = strtoken->GetName();
|
||||
yl4[i] = label.Atof();
|
||||
if (yl4[i]>0) { Flag[3]=1;}
|
||||
if (yl4[i]>0) {
|
||||
Flag[3]=1;
|
||||
intNorm = intNorm++;
|
||||
}
|
||||
|
||||
strtoken = (TObjString*) token->At(14);
|
||||
label = strtoken->GetName();
|
||||
yl5[i] = label.Atof();
|
||||
if (yl5[i]>0) { Flag[4]=1;}
|
||||
if (yl5[i]>0) {
|
||||
Flag[4]=1;
|
||||
intNorm = intNorm++;
|
||||
}
|
||||
|
||||
strtoken = (TObjString*) token->At(15);
|
||||
label = strtoken->GetName();
|
||||
yl6[i] = label.Atof();
|
||||
if (yl6[i]>0) { Flag[5]=1;}
|
||||
if (yl6[i]>0) {
|
||||
Flag[5]=1;
|
||||
intNorm = intNorm++;
|
||||
}
|
||||
|
||||
strtoken = (TObjString*) token->At(16);
|
||||
label = strtoken->GetName();
|
||||
yl7[i] = label.Atof();
|
||||
if (yl7[i]>0) { Flag[6]=1;}
|
||||
if (yl7[i]>0) {
|
||||
Flag[6]=1;
|
||||
intNorm = intNorm++;
|
||||
}
|
||||
|
||||
//}
|
||||
|
||||
@ -193,6 +218,8 @@ void plotFrc(char *FileName)
|
||||
}
|
||||
|
||||
mg->Draw("APC");
|
||||
mg->GetXaxis()->SetTitle("Energy [keV]");
|
||||
mg->GetYaxis()->SetTitle("Implanted Particles");
|
||||
legend->Draw();
|
||||
|
||||
// I am not sure what this does, but it waits until canvas is closed
|
||||
|
Loading…
x
Reference in New Issue
Block a user