Changeset 936 for trunk/MagicSoft/Mars
- Timestamp:
- 09/20/01 15:35:59 (23 years ago)
- Location:
- trunk/MagicSoft/Mars/mbase
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MLog.cc
r858 r936 71 71 // which is used for the output (i) 72 72 // 73 MLog::MLog(int i) : ostream(this), fPPtr(fBase), fEPtr(fBase+bsz), fOutputLevel(0), fDebugLevel((unsigned)-1), fDevice(i), f out(NULL), fOutAllocated(kFALSE), fgui(NULL)73 MLog::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) 74 74 { 75 75 Init(); … … 81 81 // ofstream as the default output device 82 82 // 83 MLog::MLog(ofstream &out) : ostream(this), fPPtr(fBase), fEPtr(fBase+bsz), fOutputLevel(0), fDebugLevel((unsigned)-1), fDevice(eFile), f out(&out), fOutAllocated(kFALSE), fgui(NULL)83 MLog::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) 84 84 { 85 85 Init(); … … 91 91 // TGListBox as the default output device 92 92 // 93 MLog::MLog(TGListBox &out) : ostream(this), fPPtr(fBase), fEPtr(fBase+bsz), fOutputLevel(0), fDebugLevel((unsigned)-1), fDevice(eGui), f out(NULL), fOutAllocated(kFALSE), fgui(&out)93 MLog::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) 94 94 { 95 95 Init(); … … 102 102 // or not. 103 103 // 104 MLog::MLog(const char *fname, int flag) : ostream(this), fPPtr(fBase), fEPtr(fBase+bsz), fOutputLevel(0), fDebugLevel((unsigned)-1), fDevice(eFile), f gui(NULL)104 MLog::MLog(const char *fname, int flag) : ostream(this), fPPtr(fBase), fEPtr(fBase+bsz), fOutputLevel(0), fDebugLevel((unsigned)-1), fDevice(eFile), fGuiLineId(0), fgui(NULL) 105 105 { 106 106 Init(); … … 141 141 if (fDevice&eGui && fgui) 142 142 { 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); 147 149 } 148 150 -
trunk/MagicSoft/Mars/mbase/MLog.h
r858 r936 2 2 #define MLOG_H 3 3 4 #ifndef MAGIC_H5 #include "MAGIC.h"6 #endif4 //#ifndef MAGIC_H 5 //#include "MAGIC.h" 6 //#endif 7 7 8 8 #include <TObject.h> … … 12 12 13 13 #define bsz 160 // two standard lines 14 15 enum ELogBits { 16 kHasChanged = BIT(14) // if gui has changed 17 }; 18 14 19 15 20 class TGListBox; … … 29 34 UInt_t fDebugLevel; //! Present global debug level 30 35 UInt_t fDevice; //! Flag to indicate the present streams 36 37 Int_t fGuiLineId; 31 38 32 39 ofstream *fout; //! possible file output stream … … 65 72 void operator=(ofstream &out) { SetOutputFile(out); } 66 73 void operator=(TGListBox *out) { SetOutputGui(out); } 74 75 Bool_t IsOutputDeviceEnabled(int i) const { return fDevice & i; } 67 76 68 77 void SetOutputGui(TGListBox *out, int flag=-1) -
trunk/MagicSoft/Mars/mbase/MLogManip.h
r705 r936 62 62 // Remark: All this is compiled into the code. 63 63 // 64 /* 64 65 #ifndef __CINT__ 65 66 #define DEBUG(lvl) flush << debug(lvl) << dbginf 66 67 #endif 67 68 */ 68 69 /* 69 70 class SMANIP(T) {
Note:
See TracChangeset
for help on using the changeset viewer.