Changeset 936 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
09/20/01 15:35:59 (23 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mbase
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mbase/MLog.cc

    r858 r936  
    7171// which is used for the output (i)
    7272//
    73 MLog::MLog(int i) : ostream(this), fPPtr(fBase), fEPtr(fBase+bsz), fOutputLevel(0), fDebugLevel((unsigned)-1), fDevice(i), fout(NULL), fOutAllocated(kFALSE), fgui(NULL)
     73MLog::MLog(int i) : ostream(this), fPPtr(fBase), fEPtr(fBase+bsz), fOutputLevel(0), fDebugLevel((unsigned)-1), fDevice(i), fGuiLineId(0), fout(NULL), fOutAllocated(kFALSE), fgui(NULL)
    7474{
    7575    Init();
     
    8181// ofstream as the default output device
    8282//
    83 MLog::MLog(ofstream &out) : ostream(this), fPPtr(fBase), fEPtr(fBase+bsz), fOutputLevel(0), fDebugLevel((unsigned)-1), fDevice(eFile), fout(&out), fOutAllocated(kFALSE), fgui(NULL)
     83MLog::MLog(ofstream &out) : ostream(this), fPPtr(fBase), fEPtr(fBase+bsz), fOutputLevel(0), fDebugLevel((unsigned)-1), fDevice(eFile), fGuiLineId(0),  fout(&out), fOutAllocated(kFALSE), fgui(NULL)
    8484{
    8585    Init();
     
    9191// TGListBox as the default output device
    9292//
    93 MLog::MLog(TGListBox &out) : ostream(this), fPPtr(fBase), fEPtr(fBase+bsz), fOutputLevel(0), fDebugLevel((unsigned)-1), fDevice(eGui), fout(NULL), fOutAllocated(kFALSE), fgui(&out)
     93MLog::MLog(TGListBox &out) : ostream(this), fPPtr(fBase), fEPtr(fBase+bsz), fOutputLevel(0), fDebugLevel((unsigned)-1), fDevice(eGui), fGuiLineId(0),  fout(NULL), fOutAllocated(kFALSE), fgui(&out)
    9494{
    9595    Init();
     
    102102// or not.
    103103//
    104 MLog::MLog(const char *fname, int flag) : ostream(this), fPPtr(fBase), fEPtr(fBase+bsz), fOutputLevel(0), fDebugLevel((unsigned)-1), fDevice(eFile), fgui(NULL)
     104MLog::MLog(const char *fname, int flag) : ostream(this), fPPtr(fBase), fEPtr(fBase+bsz), fOutputLevel(0), fDebugLevel((unsigned)-1), fDevice(eFile), fGuiLineId(0),  fgui(NULL)
    105105{
    106106    Init();
     
    141141    if (fDevice&eGui && fgui)
    142142    {
    143         char dummy[bsz+1];
    144         memcpy(dummy, fBase, bsz);
    145         *(dummy+bsz)='\0';
    146         fgui->AddEntry(dummy, -1);
     143        char dummy[len+1];
     144        memcpy(dummy, fBase, len);
     145        *(dummy+len)='\0';
     146        fgui->AddEntry(dummy, fGuiLineId);
     147        fgui->SetTopEntry(fGuiLineId++);
     148        fgui->SetBit(kHasChanged);
    147149    }
    148150
  • trunk/MagicSoft/Mars/mbase/MLog.h

    r858 r936  
    22#define MLOG_H
    33
    4 #ifndef MAGIC_H
    5 #include "MAGIC.h"
    6 #endif
     4//#ifndef MAGIC_H
     5//#include "MAGIC.h"
     6//#endif
    77
    88#include <TObject.h>
     
    1212
    1313#define bsz    160 // two standard lines
     14
     15enum ELogBits {
     16   kHasChanged = BIT(14)  // if gui has changed
     17};
     18
    1419
    1520class TGListBox;
     
    2934    UInt_t fDebugLevel;      //! Present global debug level
    3035    UInt_t fDevice;          //! Flag to indicate the present streams
     36
     37    Int_t fGuiLineId;
    3138
    3239    ofstream  *fout;          //! possible file output stream
     
    6572    void operator=(ofstream &out)       { SetOutputFile(out); }
    6673    void operator=(TGListBox *out)      { SetOutputGui(out);  }
     74
     75    Bool_t IsOutputDeviceEnabled(int i) const { return fDevice & i; }
    6776
    6877    void SetOutputGui(TGListBox *out, int flag=-1)
  • trunk/MagicSoft/Mars/mbase/MLogManip.h

    r705 r936  
    6262// Remark:     All this is compiled into the code.
    6363//
     64/*
    6465#ifndef __CINT__
    6566#define DEBUG(lvl)  flush << debug(lvl) << dbginf
    6667#endif
    67 
     68*/
    6869/*
    6970class SMANIP(T) {
Note: See TracChangeset for help on using the changeset viewer.