Changeset 2773
- Timestamp:
- 01/12/04 18:11:47 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2772 r2773 20 20 - changed size of ps-paper 21 21 - 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) 22 24 23 25 * mraw/MRawRunHeader.cc: 24 26 - added some comments 27 28 * status.cc: 29 - set name of input as bottom line of status display 25 30 26 31 -
trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc
r2772 r2773 560 560 // 561 561 MStatusDisplay::MStatusDisplay(Long_t t) 562 : TGMainFrame(NULL, 1, 1), f Log(&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) 563 563 { 564 564 // p==NULL means: Take gClient->GetRoot() if not in batch mode … … 1391 1391 // where (eg Eventloop) first! 1392 1392 1393 gLog << dbg << "MStatusDisplayis on heap: " << (int)IsOnHeap() << endl;1393 gLog << dbg << fName << " is on heap: " << (int)IsOnHeap() << endl; 1394 1394 1395 1395 if (TestBit(kExitLoopOnExit) || TestBit(kExitLoopOnClose)) … … 1401 1401 if (fIsLocked<=0 && IsOnHeap()) 1402 1402 { 1403 gLog << dbg << "delete MStatusDisplay;" << endl;1403 gLog << dbg << "delete " << fName << ";" << endl; 1404 1404 delete this; 1405 1405 } 1406 1406 fStatus = kFileExit; 1407 gLog << dbg << "MStatusDisplay.fStatus=kFileExit;" << endl;1407 gLog << dbg << fName << ".fStatus=kFileExit;" << endl; 1408 1408 } 1409 1409 … … 1528 1528 1529 1529 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 1530 1540 TCanvas *c; 1531 1541 while ((c=(TCanvas*)Next())) … … 1579 1589 1580 1590 TObjArray list; 1591 1592 TNamed named; 1593 named.SetTitle(fTitle); 1594 list.Add(&named); 1581 1595 1582 1596 const Int_t max = gROOT->IsBatch() ? fBatch->GetSize()+1 : fTab->GetNumberOfTabs(); … … 1764 1778 // 1765 1779 // 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. 1767 1782 // 1768 1783 Int_t MStatusDisplay::SaveAsPS(Int_t num, TString name, const TString addon) … … 1889 1904 line.PaintLineNDC(0, 1.01, 1, 1.01); 1890 1905 1891 if (!addon.IsNull()) 1906 TString txt(addon.IsNull() ? fTitle : addon); 1907 if (!txt.IsNull()) 1892 1908 { 1893 1909 line.PaintLineNDC(0, -0.00, 1, -0.00); 1894 1910 ps.SetTextAlign(23); // cent bottom 1895 ps.TextNDC(0.5, -0.005, addon);1911 ps.TextNDC(0.5, -0.005, txt); 1896 1912 } 1897 1913 -
trunk/MagicSoft/Mars/mbase/MStatusDisplay.h
r2772 r2773 34 34 { 35 35 public: 36 TString fName; // status display identifier (name) (gROOT->FindObject()) 37 TString fTitle; // status display title 38 36 39 typedef enum { 37 40 // kFile … … 143 146 void SetPrinter(const TString &lpr) { fPrinter = lpr; } 144 147 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 145 153 TCanvas &AddTab(const char *name); 146 154 TGCompositeFrame *AddRawTab(const char *name); -
trunk/MagicSoft/Mars/status.cc
r2561 r2773 164 164 gLog.SetOutputFile("status.log", kTRUE); // Enable output to file 165 165 //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); 166 169 167 170 //
Note:
See TracChangeset
for help on using the changeset viewer.