Changeset 4800 for trunk


Ignore:
Timestamp:
08/30/04 11:45:51 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r4795 r4800  
    1919
    2020                                                 -*-*- END OF LINE -*-*-
     21 2004/08/30: Thomas Bretz
     22
     23   * showlog.cc, showplot.cc:
     24     - anhanced functionality
     25
     26
     27
    2128 2004/08/29: Markus Gaug
    2229 
    23   * mbadpixels/MBadPixelsPix.[h,cc]
    24   * mbadpixels/MBadPixelsCam.cc
    25   * mjobs/MJCalibration.cc
    26     - introduced new calibration bits: kHiGainOverFlow
    27       and kLoGainOverFlow being filled when the calibration histograms
    28       overflow. Will cause an kUnsuitableRun afterwards.
    29     - added in datacheck-display of MJCalibration
    30 
    31   * mcalib/MHCalibrationChargeHiGainPix.[h,cc]
    32   * mcalib/MHCalibrationChargeLoGainPix.[h,cc]
    33     - default lower histogram limit moved to -100.5
    34 
    35   * mcalib/MHCalibrationCam.h
    36   * mcalib/MHCalibrationChargeCam.cc
    37     - make TArrayI out of fOverFlowHiGain and fOverFlowLoGain
    38 
    39   * mjobs/MJCalibration.[h,cc]
    40     - finished datacheck display with the arrival times.
     30   * mbadpixels/MBadPixelsPix.[h,cc]
     31   * mbadpixels/MBadPixelsCam.cc
     32   * mjobs/MJCalibration.cc
     33     - introduced new calibration bits: kHiGainOverFlow
     34       and kLoGainOverFlow being filled when the calibration histograms
     35       overflow. Will cause an kUnsuitableRun afterwards.
     36     - added in datacheck-display of MJCalibration
     37
     38   * mcalib/MHCalibrationChargeHiGainPix.[h,cc]
     39   * mcalib/MHCalibrationChargeLoGainPix.[h,cc]
     40     - default lower histogram limit moved to -100.5
     41
     42   * mcalib/MHCalibrationCam.h
     43   * mcalib/MHCalibrationChargeCam.cc
     44     - make TArrayI out of fOverFlowHiGain and fOverFlowLoGain
     45
     46   * mjobs/MJCalibration.[h,cc]
     47     - finished datacheck display with the arrival times.
     48
    4149
    4250
     
    4553   * mpedestal/MPedestalPix.h
    4654     - correct calculation of error of RMS
     55
     56
    4757
    4858 2004/08/27: Hendrik Bartko
     
    5161     - check that the pixel has a low gain before calculating the time
    5262       for the low gain in case of a saturated high gain.
     63
     64
    5365
    5466 2004/08/27: Markus Gaug
  • trunk/MagicSoft/Mars/callisto.cc

    r4766 r4800  
    5454    gLog << "   --debug-env               Debug setting resources from file" << endl << endl;
    5555    gLog << endl;
     56    gLog << "   -q                        Quit when job is finished" << endl;
    5657    gLog << "   -f                        Force overwrite of existing files" << endl;
    5758    gLog << "   -ff                       Force execution if not all files found" << endl;
     
    8586    gLog << " contants. These constants are stored in a so called calibration-file" << endl;
    8687    gLog << " together with some datacheck plots  which can be viewed using either" << endl;
    87     gLog << " showplot or MStatusDisplay in the interpreter." << endl << endl;
     88    gLog << " showplot or MStatusDisplay in the interpreter.  A description  of  a" << endl;
     89    gLog << " sequence-file can be found in the class reference of MSequence." << endl << endl;
    8890    gLog << "Example:" << endl;
    8991    gLog << " callisto -f --outc=mycal/ --outy=mysignal/ --log sequence02345.txt" << endl;
     
    98100    // Evaluate arguments
    99101    //
    100     MArgs arg(argc, argv);
     102    MArgs arg(argc, argv, kTRUE);
    101103
    102104    if (arg.HasOnly("-?") || arg.HasOnly("-h") || arg.HasOnly("--help"))
     
    115117    const Bool_t  kDebugEnv   = arg.HasOnlyAndRemove("--debug-env");
    116118
     119    const Bool_t  kQuit       = arg.HasOnlyAndRemove("-q");
     120    const Bool_t  kBatch      = arg.HasOnlyAndRemove("-b");
    117121    const Bool_t  kOverwrite  = arg.HasOnlyAndRemove("-f");
    118122    const Bool_t  kForceExec  = arg.HasOnlyAndRemove("-ff");
     
    380384    }
    381385
     386    if (kBatch || kQuit)
     387    {
     388        delete d;
     389        return 0;
     390    }
     391
    382392    // From now on each 'Close' means: Terminate the application
    383393    d->SetBit(MStatusDisplay::kExitLoopOnClose);
  • trunk/MagicSoft/Mars/showlog.cc

    r4756 r4800  
    11#include <errno.h>
    22#include <fstream>
     3
     4#include <TRegexp.h>
    35
    46#include "MArgs.h"
     
    1618    gLog << " or" << endl;
    1719    gLog << "   showlog [options] < filename" << endl << endl;
     20    gLog.Usage();
    1821    gLog << "   -?, -h, --help            This help" << endl << endl;
    1922    gLog << endl;
     
    2427    gLog << " colored output with less use the option -R, eg." << endl;
    2528    gLog << "   less -R logfile.log" << endl << endl;
     29}
     30
     31void RemoveAnsi(TString &s)
     32{
     33    static const TRegexp regexp("[][[][0-9]+[m]");
     34
     35    int i=0;
     36
     37    while (1)
     38    {
     39        Ssiz_t len = 0;
     40        Ssiz_t idx = s.Index(regexp, &len);
     41        if (idx<0)
     42            break;
     43
     44        s.Remove(idx, len);
     45    }
    2646}
    2747
     
    3757        return -1;
    3858    }
     59
     60    const Bool_t kNoColors = arg.HasOnly("--no-colors") || arg.HasOnly("-a");
     61
     62    gLog.Setup(arg);
    3963
    4064    if (arg.GetNumOptions()>0)
     
    6993            break;
    7094
    71         s.ReplaceAll("", "\033");
     95        if (kNoColors)
     96            RemoveAnsi(s);
     97        else
     98            s.ReplaceAll("", "\033");
    7299        gLog << s << endl;
    73100    }
  • trunk/MagicSoft/Mars/showplot.cc

    r4722 r4800  
    2828    gLog << all << endl;
    2929    gLog << "Sorry the usage is:" << endl;
    30     gLog << " showplot filename" << endl << endl;
     30    gLog << " showplot [options] filename" << endl << endl;
     31    gLog << " Arguments:" << endl;
     32    gLog << "   filename                  Input file containing an MStatusArray" << endl << endl;
     33    gLog << " Root Options:" << endl;
     34    gLog << "   -b                        Batch mode (no graphical output to screen)" << endl<<endl;
     35    gLog << " Options: "<< endl;
     36    gLog.Usage();
     37    gLog << "   -q                        Quit when job is finished" << endl;
     38    gLog << endl;
     39    gLog << " Output Options: "<< endl;
     40    gLog << "   --save-as-ps[=filename]   Save plots as postscript" << endl;
     41    gLog << "   --save-as-gif[=filename]  Save plots as gif files" << endl;
     42    gLog << "   --save-as-C[=filename]    Save plots as root scripts" << endl;
     43    gLog << "   --tab=num                 Save only tab number num" << endl << endl;
    3144    gLog << "Description:" << endl;
    3245    gLog << " Use showplot to display a MStatusArray in an MStatusDisplay." << endl;
     
    5164    }
    5265
     66    gLog.Setup(arg);
     67
     68    const Bool_t kQuit      = arg.HasOnlyAndRemove("-q");
     69    const Bool_t kBatch     = arg.HasOnlyAndRemove("-b");
     70
     71    const Int_t  kTab       = arg.GetIntAndRemove("--tab=", -1);
     72
     73    const Bool_t kSaveAsPs  = arg.HasOnlyAndRemove("--save-as-ps") || arg.Has("--save-as-ps=");
     74    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=");
     76
     77    TString kNamePs  = arg.GetStringAndRemove("--save-as-ps=");
     78    TString kNameGif = arg.GetStringAndRemove("--save-as-gif=");
     79    TString kNameC   = arg.GetStringAndRemove("--save-as-C=");
     80
     81
    5382    //
    5483    // check for the right usage of the program
     
    6089    }
    6190
    62     const TString kInput = arg.GetArgumentStr(0);
    63 
    6491    TApplication app("Callisto", &argc, argv);
    6592    if (gROOT->IsBatch() || !gClient)
     
    6895        return 1;
    6996    }
     97
     98    //
     99    // Process filenames
     100    //
     101    const TString kInput = arg.GetArgumentStr(0);
     102
     103    if (kNamePs.IsNull() && kSaveAsPs)
     104        kNamePs = kInput;
     105    if (kNameGif.IsNull() && kSaveAsGif)
     106        kNameGif = kInput;
     107    if (kNameC.IsNull() && kSaveAsC)
     108        kNameC = kInput;
    70109
    71110    //
     
    78117    d->Open(kInput);
    79118
     119    if (kSaveAsPs)
     120        d->SaveAsPS(kTab, kNamePs);
     121    if (kSaveAsGif)
     122        d->SaveAsGIF(kTab, kNameGif);
     123    if (kSaveAsC)
     124        d->SaveAsC(kTab, kNameC);
     125
     126    if (kBatch || kQuit)
     127    {
     128        delete d;
     129        return 0;
     130    }
     131
    80132    // From now on each 'Close' means: Terminate the application
    81133    d->SetBit(MStatusDisplay::kExitLoopOnClose);
Note: See TracChangeset for help on using the changeset viewer.