Changeset 3504
- Timestamp:
- 03/15/04 16:15:51 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r3503 r3504 73 73 * mmain/MCameraDisplay.cc, mmain/MEventDisplay.[h,cc]: 74 74 - added preliminary mode to display F1/F2/F3-files 75 76 * mbase/MStatusArray.[h,cc]: 77 - added 78 79 * mbase/Makefile, mbase/BaseLinkDef.h: 80 - added MStatusArray 81 82 * mbase/MStatusDisplay.cc: 83 - read and store MStatusArray to and from files 75 84 76 85 -
trunk/MagicSoft/Mars/mbase/BaseLinkDef.h
r3326 r3504 39 39 40 40 // Mars core (GUI part) 41 #pragma link C++ class MStatusArray+; 41 42 #pragma link C++ class MStatusDisplay+; 42 43 #pragma link C++ class MProgressBar+; -
trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc
r3503 r3504 98 98 #include "MSearch.h" // MSearch 99 99 #include "MParContainer.h" // MParContainer::GetDescriptor 100 #include "MStatusArray.h" // MStatusArray 100 101 101 102 #undef DEBUG … … 169 170 #define MGTextView TGTextView 170 171 #endif 172 171 173 // -------------------------------------------------------------------------- 172 174 … … 1540 1542 } 1541 1543 1542 // -------------------------------------------------------------------------- 1543 // 1544 // Reads the contents of a saved MStatusDisplay from a file. 1545 // 1546 Int_t MStatusDisplay::Read(const char *name) 1547 { 1548 if (!gFile) 1549 { 1550 *fLog << warn << "MStatusDisplay::Read: No file found. Please create a TFile first." << endl; 1551 return 0; 1552 } 1553 1554 if (!gFile->IsOpen()) 1555 { 1556 *fLog << warn << "MStatusDisplay::Read: File not open. Please open the TFile first." << endl; 1557 return 0; 1558 } 1559 1560 TObjArray list; 1561 1562 const Int_t n = list.Read(name); 1563 if (n==0) 1564 { 1565 *fLog << warn << "MStatusDisplay::Read: No objects read." << endl; 1566 return 0; 1567 } 1568 1544 Bool_t MStatusDisplay::Display(const TObjArray &list) 1545 { 1569 1546 TIter Next(&list); 1570 1547 … … 1572 1549 if (!o) 1573 1550 { 1574 *fLog << err << "MStatusDisplay: First entry missing in " << name << "." << endl;1575 return 0;1551 *fLog << err << "MStatusDisplay::Display: No entry in TObjArray." << endl; 1552 return kFALSE; 1576 1553 } 1577 1554 … … 1583 1560 DrawClonePad(AddTab(c->GetName()), *c); 1584 1561 1562 return kTRUE; 1563 } 1564 1565 // -------------------------------------------------------------------------- 1566 // 1567 // Reads the contents of a saved MStatusDisplay from a file. 1568 // 1569 Int_t MStatusDisplay::Read(const char *name) 1570 { 1571 if (!gFile) 1572 { 1573 *fLog << warn << "MStatusDisplay::Read: No file found. Please create a TFile first." << endl; 1574 return 0; 1575 } 1576 1577 if (!gFile->IsOpen()) 1578 { 1579 *fLog << warn << "MStatusDisplay::Read: File not open. Please open the TFile first." << endl; 1580 return 0; 1581 } 1582 1583 TObjArray list; 1584 1585 const Int_t n = list.Read(name); 1586 if (n==0) 1587 { 1588 *fLog << warn << "MStatusDisplay::Read: No objects read." << endl; 1589 return 0; 1590 } 1591 1592 if (!Display(list)) 1593 { 1594 *fLog << err << "MStatusDisplay::Display: No entry in " << name << "." << endl; 1595 return 0; 1596 } 1597 1585 1598 *fLog << inf << "MStatusDisplay: Key " << name << " with " << n << " keys read from file." << endl; 1586 1599 … … 1629 1642 } 1630 1643 1631 TObjArray list;1644 MStatusArray list; 1632 1645 1633 1646 TNamed named; -
trunk/MagicSoft/Mars/mbase/Makefile
r3331 r3504 59 59 MGList.cc \ 60 60 MGTask.cc \ 61 MStatusArray.cc \ 61 62 MStatusDisplay.cc \ 62 63 MArray.cc \
Note:
See TracChangeset
for help on using the changeset viewer.