Skip to content
Snippets Groups Projects
Commit 3896ee58 authored by Stephen A. Wood's avatar Stephen A. Wood Committed by Mark K Jones
Browse files

Sync main.C with podd version.

  Fix annoyance of spurious extra prompt on exit
  Add -l, -v and --version command line options
parent 36e2347b
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,7 @@
#include "THcInterface.h"
#include <iostream>
#include <cstring>
using namespace std;
......@@ -13,9 +14,26 @@ int main(int argc, char **argv)
{
// Create a ROOT-style interactive interface
// Handle convenience command line options
bool print_version = false, no_logo = false;
for( int i=1; i<argc; ++i ) {
if( !strcmp(argv[i],"-l") )
no_logo = true;
else if( !strcmp(argv[1],"-v") || !strcmp(argv[1],"--version") ) {
print_version = true;
break;
}
}
if( print_version ) {
cout << "hcana using " << THcInterface::GetVersionString() << endl;
return 0;
}
TApplication *theApp =
new THcInterface( "The Hall C analyzer", &argc, argv );
theApp->Run(kTRUE);
new THcInterface( "The Hall C analyzer", &argc, argv, 0, 0, no_logo );
theApp->Run(kFALSE);
cout << endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment