Perform natural sorting on file names before plotting profiles
This commit is contained in:
@ -32,11 +32,15 @@ void plotRge(TString &names)
|
||||
|
||||
Int_t i, j;
|
||||
Int_t nStep = 0;
|
||||
Int_t nStepmax = 0;
|
||||
Double_t *depth;
|
||||
Double_t *nStop;
|
||||
Double_t *depthmax;
|
||||
Double_t *nStopmax;
|
||||
Double_t norm;
|
||||
Double_t intNorm;
|
||||
Double_t normStop[1000];
|
||||
Double_t normStopmax[1000];
|
||||
|
||||
TGraph *rge[1000];
|
||||
|
||||
@ -93,6 +97,10 @@ void plotRge(TString &names)
|
||||
if (depth[j] > xmax) {
|
||||
xmax = depth[j];
|
||||
imax = i;
|
||||
depthmax=depth;
|
||||
nStepmax=nStep;
|
||||
nStopmax=nStop;
|
||||
// normStopmax=normStop;
|
||||
}
|
||||
if (depth[j] < xmin) {
|
||||
xmin = depth[j];
|
||||
@ -112,8 +120,6 @@ void plotRge(TString &names)
|
||||
delete fileGraph;
|
||||
}
|
||||
cout << endl;
|
||||
// plot again deepest to get the right x scale !!
|
||||
// rge[imax] = new TGraph(nStep, depth, normStop);
|
||||
|
||||
Int_t color[1000];
|
||||
for (i=0; i<1000; i++)
|
||||
@ -128,6 +134,9 @@ void plotRge(TString &names)
|
||||
color[7] = TColor::kOrange+4;
|
||||
color[8] = TColor::kBlue-7;
|
||||
|
||||
// plot again deepest to get the right x scale !!
|
||||
// rge[999] = new TGraph(nStepmax, depthmax, normStopmax);
|
||||
|
||||
Int_t last = tokens->GetEntries()-1;
|
||||
// Int_t last = imax;
|
||||
rge[last]->SetMarkerStyle(20);
|
||||
@ -139,8 +148,9 @@ void plotRge(TString &names)
|
||||
|
||||
rge[last]->Draw("apc");
|
||||
rge[last]->GetYaxis()->SetRangeUser(min, 1.05*max);
|
||||
// This does not work
|
||||
rge[last]->GetXaxis()->SetRangeUser(xmin, xmax);
|
||||
// cout << "xmin " << xmin << " xmax" << xmax << endl;
|
||||
cout << "xmin =" << xmin << ", xmax = " << xmax << ", imax = " << imax << endl;
|
||||
|
||||
|
||||
Int_t col;
|
||||
@ -166,6 +176,7 @@ void plotRge(TString &names)
|
||||
}
|
||||
legend->Draw();
|
||||
|
||||
|
||||
delete tokens;
|
||||
|
||||
// I am not sure what this does, but it waits until canvas is closed
|
||||
|
Reference in New Issue
Block a user