Added option to save data from canvas a quit for non-interactive mode (web).
This commit is contained in:
parent
be9bfdf091
commit
8035bafec4
@ -67,6 +67,8 @@ void musrview_syntax()
|
||||
cout << endl << " eps, pdf, gif, jpg, png, svg, xpm, root";
|
||||
cout << endl << " example: musrview 3310.msr --png, will produce a files 3310_X.png";
|
||||
cout << endl << " where 'X' stands for the plot number (starting form 0)";
|
||||
cout << endl << " --ascii: ";
|
||||
cout << endl << " will produce an ascii dump of the data and fit as plotted.";
|
||||
cout << endl << " --timeout <timeout>: <timeout> given in seconds after which musrview terminates.";
|
||||
cout << endl << " If <timeout> <= 0, no timeout will take place. Default <timeout> is 0.";
|
||||
cout << endl;
|
||||
@ -100,6 +102,7 @@ int main(int argc, char *argv[])
|
||||
bool success = true;
|
||||
char fileName[128];
|
||||
bool graphicsOutput = false;
|
||||
bool asciiOutput = false;
|
||||
char graphicsExtension[128];
|
||||
int timeout = 0;
|
||||
|
||||
@ -135,6 +138,8 @@ int main(int argc, char *argv[])
|
||||
|
||||
graphicsOutput = true;
|
||||
strcpy(graphicsExtension, argv[i]+2);
|
||||
} else if (!strcmp(argv[i], "--ascii")) {
|
||||
asciiOutput = true;
|
||||
} else if (!strcmp(argv[i], "--timeout")) {
|
||||
if (i+1 < argc) {
|
||||
TString str(argv[i+1]);
|
||||
@ -334,6 +339,10 @@ int main(int argc, char *argv[])
|
||||
musrCanvas->SaveGraphicsAndQuit(fileName, graphicsExtension);
|
||||
}
|
||||
|
||||
if (asciiOutput) {
|
||||
musrCanvas->SaveDataAsciiAndQuit();
|
||||
}
|
||||
|
||||
// keep musrCanvas objects
|
||||
canvasVector.push_back(musrCanvas);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user