Changeset 9038 for trunk


Ignore:
Timestamp:
07/23/08 11:11:13 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r9036 r9038  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20
     21 2008/07/23 Thomas Bretz
     22
     23   * showplot.cc:
     24     - allow to read more than one file
     25
     26   * datacenter/macros/stage.C:
     27     - chnaged the return type to int
     28
     29   * mbase/MStatusArray.cc:
     30     - added a check for the key in read to supress the root error
     31       on the console
     32
     33   * mbase/MStatusDisplay.[h,cc]:
     34     - stop update timer in destructor
     35     - added new member function GetNumTabs
     36     - we don't need to switch to batchmore when painting canvases
     37       anymore
     38     - removed an obsolete cout
     39
     40   * mjobs/MJCalibrateSignal.cc:
     41     - changed again the wrong names of the tasklists
     42
     43
    2044
    2145 2008/07/22 Thomas Bretz
     
    98122     - small change to log-level
    99123
     124   * mbase/MTaskList.cc:
     125     - in case of an unknown return value stop event loop
     126
     127   * mfileio/MRead.cc:
     128     - use gSystem->BaseName to get file name
    100129
    101130
  • trunk/MagicSoft/Mars/NEWS

    r9036 r9038  
    2626   * MReadTree can now read also files not written by MARS and store
    2727     the data encapsulated in emulated MParContainers
     28
     29 ;showplot
     30
     31   * showplot can now read more than one file at once. This is especially
     32     inetersting if reading files containing pure canvases
    2833
    2934 ;merpp
  • trunk/MagicSoft/Mars/datacenter/macros/stage.C

    r9021 r9038  
    2929}
    3030
    31 void stage(Int_t sequno, Int_t tel, TString path="")
     31int stage(Int_t sequno, Int_t tel, TString path="")
    3232{
    3333    const MSequenceSQL s("sql.rc", sequno, tel);
     
    4040}
    4141
    42 void stage(const char *seq, TString path="")
     42int stage(const char *seq, TString path="")
    4343{
    4444    const MSequence s(seq);
  • trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc

    r8965 r9038  
    780780MStatusDisplay::~MStatusDisplay()
    781781{
     782    fTimer.Stop();
     783
    782784#if ROOT_VERSION_CODE < ROOT_VERSION(3,10,01)
    783785    fTab = NULL; // See HandleEvent
     
    959961    c->cd();
    960962    return kTRUE;
     963}
     964
     965// --------------------------------------------------------------------------
     966//
     967// Return the number of user added tabs (not that in batch mode this
     968// exclude tabs without a canvas)
     969//
     970Int_t MStatusDisplay::GetNumTabs() const
     971{
     972    return gROOT->IsBatch() ? fBatch->GetEntries() : fTab->GetNumberOfTabs()-1;
    961973}
    962974
     
    22492261
    22502262
    2251     cout << "Display done." << endl;
    2252 
    22532263    if (n==0)
    22542264        return list.GetEntries();
     
    26832693        // deletion
    26842694        //
    2685         const Bool_t store = c->IsBatch();
    2686 
    2687         c->SetBatch(kTRUE);
     2695        //const Bool_t store = c->IsBatch();
     2696        //c->SetBatch(kTRUE);
    26882697        c->Paint();
    2689         c->SetBatch(store);
     2698        //c->SetBatch(store);
    26902699
    26912700        //
    26922701        // Use the canvas as coordinate system for the overlaying text
    26932702        //
    2694         gPad = c;
    2695         //n->cd();
    2696 
    26972703        const Double_t height = 0.015;
    26982704
  • trunk/MagicSoft/Mars/mbase/MStatusDisplay.h

    r8988 r9038  
    196196     TObject *FindObject(const TObject *) const { return 0;  }
    197197
     198     Int_t GetNumTabs() const;
     199
    198200     void PrintContent(Option_t *o="") const;
    199201
  • trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc

    r9027 r9038  
    759759    // Build tasklist
    760760
    761     MTaskList tlist2("PedEvents");
     761    MTaskList tlist2("AllEvents");
    762762
    763763    tlist2.AddToList(&caldec);
     
    771771    // Pedestal extraction
    772772
    773     MTaskList tlist3("CalEvents");
     773    MTaskList tlist3("PedEvents");
    774774    tlist3.SetFilter(&fped);         // Deny events with cal-trigger
    775775
     
    786786    // Calibration
    787787
    788     MTaskList tlist4;
     788    MTaskList tlist4("CalEvents");
    789789    tlist4.SetFilter(&fcalib);       // process only events with cal-trigger
    790790
  • trunk/MagicSoft/Mars/showplot.cc

    r8962 r9038  
    1919    gLog << endl;
    2020    gLog << "showplot --- Mars V" << MARSVER << " compiled on <" << __DATE__ << "> using ROOT v" << ROOT_RELEASE << endl;
    21     gLog << endl;
     21    //gLog << endl;
    2222}
    2323
     
    2828    gLog << all << endl;
    2929    gLog << "Sorry the usage is:" << endl;
    30     gLog << " showplot [options] {filename}|{filetype number}" << endl << endl;
     30    gLog << " showplot [options]" << endl;
     31    gLog << " showplot [options] file1 file2 file3 ..." << endl;
     32    gLog << " showplot [options] filetype number" << endl << endl;
    3133    gLog << " Arguments:" << endl;
    32     gLog << "   filename                  Input file containing an MStatusArray" << endl;
     34    gLog << "   fil1 file2 ...            Input files containing an MStatusArray of TCanvases" << endl;
    3335    gLog << "   filetype number           Open file of filetype calib, signal, star, etc." << endl;
    3436    gLog << "                             of sequence or dataset number" << endl << endl;
     
    100102    // Something special for datacenter access
    101103    //
    102     if (args.GetNumArguments()!=2)
     104    if (args.GetNumArguments()==1)
    103105        return kInput;
    104106
     107    if (args.GetNumArguments()!=2 || !args.GetArgumentStr(1).IsDigit())
     108        return "";
     109
    105110    //
    106111    // Something special for datacenter access
    107112    //
    108     const Int_t num = args.GetArgumentStr(1).Atoi();
     113    const Int_t num = args.GetArgumentInt(1);
    109114
    110115    TString file = "/magic/data/";
     
    191196
    192197    //
    193     // check arguments before processing them in InflatePath
    194     //
    195     if (arg.GetNumArguments()<1 || arg.GetNumArguments()>2)
    196     {
    197         gLog << warn << "WARNING - Wrong number of arguments..." << endl;
    198         Usage();
    199         return 2;
    200     }
    201     if (arg.GetNumArguments()==2 && !arg.GetArgumentStr(1).IsDigit())
    202     {
    203         gLog << warn << "WARNING - First argument must not be a number..." << endl;
    204         Usage();
    205         return 2;
    206     }
     198    // Get file name(s)
     199    //
     200    const TString kInput = InflatePath(arg);
     201    const TString kTitle = kInput.IsNull() ? kInput + "..."  : kInput;
    207202
    208203    //
    209204    // Process filenames
    210205    //
    211     const TString kInput = InflatePath(arg);
    212 
    213206    const TString kNamePrint = arg.GetStringAndRemove("--print=",        kInput);
    214207    const TString kPrintCmd  = arg.GetStringAndRemove("--print-cmd=",    kInput);
     
    255248
    256249    // From now on each 'Exit' means: Terminate the application
    257     d->SetTitle(kInput);
    258     d->SetWindowName(kInput);
     250    d->SetTitle(kTitle);
     251    d->SetWindowName(kTitle);
    259252
    260253    if (kCanvasHeight>0)
     
    263256        d->SetCanvasWidth(kCanvasWidth);
    264257
    265     const Int_t rc = d->Open(kInput);
     258    if (!kInput.IsNull())
     259        d->Open(kInput);
     260    else
     261    {
     262        for (int i=0; i<arg.GetNumArguments(); i++)
     263            d->Open(arg.GetArgumentStr(i));
     264    }
    266265
    267266    if (kPrint)
     
    294293        d->SaveAsC(kTab,    kNameC);
    295294
    296     if (kBatch || kQuit || !rc)
     295    if (arg.GetNumArguments()>0)
     296    {
     297        if (d->GetNumTabs())
     298            gLog << all << d->GetNumTabs() << " tab(s) displayed." << endl;
     299        else
     300            gLog << err << "Display empty... closing." << endl;
     301    }
     302    gLog << endl;
     303
     304    if (kBatch || kQuit || (arg.GetNumArguments()>0 && d->GetNumTabs()==0))
    297305    {
    298306        delete d;
Note: See TracChangeset for help on using the changeset viewer.