Changeset 3504 for trunk


Ignore:
Timestamp:
03/15/04 16:15:51 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r3503 r3504  
    7373   * mmain/MCameraDisplay.cc, mmain/MEventDisplay.[h,cc]:
    7474     - 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
    7584
    7685
  • trunk/MagicSoft/Mars/mbase/BaseLinkDef.h

    r3326 r3504  
    3939
    4040// Mars core (GUI part)
     41#pragma link C++ class MStatusArray+;
    4142#pragma link C++ class MStatusDisplay+;
    4243#pragma link C++ class MProgressBar+;
  • trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc

    r3503 r3504  
    9898#include "MSearch.h"              // MSearch
    9999#include "MParContainer.h"        // MParContainer::GetDescriptor
     100#include "MStatusArray.h"         // MStatusArray
    100101
    101102#undef DEBUG
     
    169170#define MGTextView TGTextView
    170171#endif
     172
    171173// --------------------------------------------------------------------------
    172174
     
    15401542}
    15411543
    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 
     1544Bool_t MStatusDisplay::Display(const TObjArray &list)
     1545{
    15691546    TIter Next(&list);
    15701547
     
    15721549    if (!o)
    15731550    {
    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;
    15761553    }
    15771554
     
    15831560            DrawClonePad(AddTab(c->GetName()), *c);
    15841561
     1562    return kTRUE;
     1563}
     1564
     1565// --------------------------------------------------------------------------
     1566//
     1567// Reads the contents of a saved MStatusDisplay from a file.
     1568//
     1569Int_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
    15851598    *fLog << inf << "MStatusDisplay: Key " << name << " with " << n << " keys read from file." << endl;
    15861599
     
    16291642    }
    16301643
    1631     TObjArray list;
     1644    MStatusArray list;
    16321645
    16331646    TNamed named;
  • trunk/MagicSoft/Mars/mbase/Makefile

    r3331 r3504  
    5959           MGList.cc \
    6060           MGTask.cc \
     61           MStatusArray.cc \
    6162           MStatusDisplay.cc \
    6263           MArray.cc \
Note: See TracChangeset for help on using the changeset viewer.