#include #include #include #include #include "MLog.h" #include "MLogManip.h" #include "MArgs.h" #include "MStatusDisplay.h" using namespace std; static void StartUpMessage() { // 1 2 3 4 5 // 12345678901234567890123456789012345678901234567890 gLog << endl; gLog << "showplot --- Mars V" << MARSVER << " compiled on <" << __DATE__ << "> using ROOT v" << ROOTVER << endl; gLog << endl; } static void Usage() { // 1 2 3 4 5 6 7 8 // 12345678901234567890123456789012345678901234567890123456789012345678901234567890 gLog << all << endl; gLog << "Sorry the usage is:" << endl; gLog << " showplot [options] filename" << endl << endl; gLog << " Arguments:" << endl; gLog << " filename Input file containing an MStatusArray" << endl << endl; gLog << " Root Options:" << endl; gLog << " -b Batch mode (no graphical output to screen)" << endl<IsBatch() && !gClient || gROOT->IsBatch() && !kBatch) { gLog << err << "Bombing... maybe your DISPLAY variable is not set correctly!" << endl; return 1; } // // Process filenames // const TString kInput = arg.GetArgumentStr(0); if (kNamePs.IsNull() && kSaveAsPs) kNamePs = kInput; if (kNameGif.IsNull() && kSaveAsGif) kNameGif = kInput; if (kNameC.IsNull() && kSaveAsC) kNameC = kInput; // // Update frequency by default = 1Hz // MStatusDisplay *d = new MStatusDisplay; // From now on each 'Exit' means: Terminate the application d->SetTitle(kInput); d->Open(kInput); if (kSaveAsPs) d->SaveAsPS(kTab, kNamePs); if (kSaveAsGif) d->SaveAsGIF(kTab, kNameGif); if (kSaveAsC) d->SaveAsC(kTab, kNameC); if (kBatch || kQuit) { delete d; return 0; } // From now on each 'Close' means: Terminate the application d->SetBit(MStatusDisplay::kExitLoopOnClose); // Wait until the user decides to exit the application app.Run(kFALSE); return 0; }