Changeset 6167 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
02/01/05 14:37:19 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r6159 r6167  
    2020
    2121                                                 -*-*- END OF LINE -*-*-
     22
     23 2005/02/01 Thomas Bretz
     24
     25   * showplot.cc:
     26     - another fix to make the batch mode working (you can use the batch
     27       mode to convert a root-file into another format)
     28
     29
    2230
    2331 2005/01/31 Thomas Bretz
  • trunk/MagicSoft/Mars/NEWS

    r6031 r6167  
    5656      roughly 0.5%
    5757
     58    - fixed showplot to make file format conversion (eg. converting a
     59      status display stored in a root file into a postscript file) in
     60      batch mode possible:
     61      showplot -b --save-as-ps[=outfile.ps] infile.root
     62
    5863
    5964
  • trunk/MagicSoft/Mars/showplot.cc

    r5618 r6167  
    5656    // Evaluate arguments
    5757    //
    58     MArgs arg(argc, argv);
     58    MArgs arg(argc, argv, kTRUE);
    5959
    6060    if (arg.HasOnly("-?") || arg.HasOnly("-h") || arg.HasOnly("--help"))
     
    7171    const Int_t  kTab       = arg.GetIntAndRemove("--tab=", -1);
    7272
    73     const Bool_t kSaveAsPs  = arg.HasOnlyAndRemove("--save-as-ps") || arg.Has("--save-as-ps=");
     73    const Bool_t kSaveAsPs  = arg.HasOnlyAndRemove("--save-as-ps")  || arg.Has("--save-as-ps=");
    7474    const Bool_t kSaveAsGif = arg.HasOnlyAndRemove("--save-as-gif") || arg.Has("--save-as-gif=");
    75     const Bool_t kSaveAsC   = arg.HasOnlyAndRemove("--save-as-C") || arg.Has("--save-as-C=");
     75    const Bool_t kSaveAsC   = arg.HasOnlyAndRemove("--save-as-C")   || arg.Has("--save-as-C=");
    7676
    7777    TString kNamePs  = arg.GetStringAndRemove("--save-as-ps=");
     
    8989    }
    9090
    91     TApplication app("Callisto", &argc, argv);
    92     if (gROOT->IsBatch() || !gClient)
     91    TApplication app("Showplot", &argc, argv);
     92    if (!gROOT->IsBatch() && !gClient || gROOT->IsBatch() && !kBatch)
    9393    {
    9494        gLog << err << "Bombing... maybe your DISPLAY variable is not set correctly!" << endl;
     
    101101    const TString kInput = arg.GetArgumentStr(0);
    102102
    103     if (kNamePs.IsNull() && kSaveAsPs)
     103    if (kNamePs.IsNull()  && kSaveAsPs)
    104104        kNamePs = kInput;
    105105    if (kNameGif.IsNull() && kSaveAsGif)
    106106        kNameGif = kInput;
    107     if (kNameC.IsNull() && kSaveAsC)
     107    if (kNameC.IsNull()   && kSaveAsC)
    108108        kNameC = kInput;
    109109
Note: See TracChangeset for help on using the changeset viewer.