Changeset 2773


Ignore:
Timestamp:
01/12/04 18:11:47 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r2772 r2773  
    2020     - changed size of ps-paper
    2121     - added a user defined bottom line to the ps-files
     22     - added name (currently unused)
     23     - added title (used as possible bottom line in ps-file)
    2224     
    2325   * mraw/MRawRunHeader.cc:
    2426     - added some comments
     27
     28   * status.cc:
     29     - set name of input as bottom line of status display
    2530
    2631
  • trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc

    r2772 r2773  
    560560//
    561561MStatusDisplay::MStatusDisplay(Long_t t)
    562 : TGMainFrame(NULL, 1, 1), fLog(&gLog), fTab(NULL), fTimer(this, t, kTRUE), fStatus(kLoopNone), fLogIdx(-1), fLogTimer(this, 250, kTRUE), fLogBox(NULL), fIsLocked(0)
     562: TGMainFrame(NULL, 1, 1), fName("MStatusDisplay"), fLog(&gLog), fTab(NULL), fTimer(this, t, kTRUE), fStatus(kLoopNone), fLogIdx(-1), fLogTimer(this, 250, kTRUE), fLogBox(NULL), fIsLocked(0)
    563563{
    564564    // p==NULL means: Take gClient->GetRoot() if not in batch mode
     
    13911391    //        where (eg Eventloop) first!
    13921392
    1393     gLog << dbg << "MStatusDisplay is on heap: " << (int)IsOnHeap() << endl;
     1393    gLog << dbg << fName << " is on heap: " << (int)IsOnHeap() << endl;
    13941394
    13951395    if (TestBit(kExitLoopOnExit) || TestBit(kExitLoopOnClose))
     
    14011401    if (fIsLocked<=0 && IsOnHeap())
    14021402    {
    1403         gLog << dbg << "delete MStatusDisplay;" << endl;
     1403        gLog << dbg << "delete " << fName << ";" << endl;
    14041404        delete this;
    14051405    }
    14061406    fStatus = kFileExit;
    1407     gLog << dbg << "MStatusDisplay.fStatus=kFileExit;" << endl;
     1407    gLog << dbg << fName << ".fStatus=kFileExit;" << endl;
    14081408}
    14091409
     
    15281528
    15291529    TIter Next(&list);
     1530
     1531    TObject *o=Next();
     1532    if (!o)
     1533    {
     1534        *fLog << err << "MStatusDisplay: First entry missing in " << name << "." << endl;
     1535        return 0;
     1536    }
     1537
     1538    fTitle = o->GetTitle();
     1539
    15301540    TCanvas *c;
    15311541    while ((c=(TCanvas*)Next()))
     
    15791589
    15801590    TObjArray list;
     1591
     1592    TNamed named;
     1593    named.SetTitle(fTitle);
     1594    list.Add(&named);
    15811595
    15821596    const Int_t max  = gROOT->IsBatch() ? fBatch->GetSize()+1 : fTab->GetNumberOfTabs();
     
    17641778//
    17651779// If the third argument is given a bottom line is drawn with the text
    1766 // under it.
     1780// under it. If no argument is given a bottom line is drawn if
     1781// fTitle (SetTitle) is not empty.
    17671782//
    17681783Int_t MStatusDisplay::SaveAsPS(Int_t num, TString name, const TString addon)
     
    18891904        line.PaintLineNDC(0, 1.01, 1, 1.01);
    18901905
    1891         if (!addon.IsNull())
     1906        TString txt(addon.IsNull() ? fTitle : addon);
     1907        if (!txt.IsNull())
    18921908        {
    18931909            line.PaintLineNDC(0, -0.00, 1, -0.00);
    18941910            ps.SetTextAlign(23); // cent bottom
    1895             ps.TextNDC(0.5, -0.005, addon);
     1911            ps.TextNDC(0.5, -0.005, txt);
    18961912        }
    18971913
  • trunk/MagicSoft/Mars/mbase/MStatusDisplay.h

    r2772 r2773  
    3434{
    3535public:
     36    TString fName;        // status display identifier (name) (gROOT->FindObject())
     37    TString fTitle;       // status display title
     38
    3639    typedef enum {
    3740        // kFile
     
    143146     void SetPrinter(const TString &lpr) { fPrinter = lpr; }
    144147
     148     virtual void SetName(const char *name) { fName = name; }
     149     virtual void SetTitle(const char *title="") { fTitle = title; }
     150     virtual const char *GetName() const { return fName.Data(); }
     151     virtual const char *GetTitle() const { return fTitle.Data(); }
     152
    145153     TCanvas &AddTab(const char *name);
    146154     TGCompositeFrame *AddRawTab(const char *name);
  • trunk/MagicSoft/Mars/status.cc

    r2561 r2773  
    164164    gLog.SetOutputFile("status.log", kTRUE);  // Enable output to file
    165165    //gLog.EnableOutputDevice(MLog::eStdout); // Enable output to stdout again
     166
     167    // Set input file as display title (bottom line in ps file)
     168    d->SetTitle(kNamein);
    166169
    167170    //
Note: See TracChangeset for help on using the changeset viewer.