Ignore:
Timestamp:
11/03/03 15:41:36 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mbase
Files:
3 edited

Legend:

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

    r2438 r2454  
    7575#include <TTime.h>          // TTime
    7676#include <TFile.h>          // gFile
     77#include <TThread.h>        // TThread::Self()
    7778#include <TDatime.h>        // TDatime
    7879#include <TSystem.h>        // gSystem
     
    372373        fProgress->SetPosition(num/fNumEvents);
    373374
    374     //
    375     // Handle GUI events (display changes)
    376     //
     375
     376    // FIXME: This is a workaround, because TApplication::Run is not
     377    //        thread safe against ProcessEvents. We assume, that if
     378    //        we are not in the Main-Thread ProcessEvents() is
     379    //        called by the TApplication Event Loop...
     380    if (!TThread::Self()/*gApplication->InheritsFrom(TRint::Class())*/)
     381    {
     382        //
     383        // Handle GUI events (display changes)
     384        //
    377385#if ROOT_VERSION_CODE < ROOT_VERSION(3,02,06)
    378     gSystem->ProcessEvents();
     386        gSystem->ProcessEvents();
    379387#else
    380     // FIXME: This is a workaround, because TApplication::Run is not thread safe against ProcessEvents
    381     if (gApplication->InheritsFrom(TRint::Class()))
    382     {
    383388        if (fDisplay)
    384389            gSystem->ProcessEvents();
     
    386391            if (fProgress)
    387392                gClient->ProcessEventsFor(fProgress);
    388     }
    389393#endif
     394    }
    390395
    391396    return rc;
     
    485490        //fProgress->SetPosition(maxcnt>0 ? TMath::Min(maxcnt, entries) : entries);
    486491        fProgress->SetPosition(1);
    487         // FIXME: This is a workaround, because TApplication::Run is not thread safe against ProcessEvents
    488         if (gApplication->InheritsFrom(TRint::Class()))
     492
     493        // FIXME: This is a workaround, because TApplication::Run is not
     494        //        thread safe against ProcessEvents. We assume, that if
     495        //        we are not in the Main-Thread ProcessEvents() is
     496        //        called by the TApplication Event Loop...
     497        if (!TThread::Self()/*gApplication->InheritsFrom(TRint::Class())*/)
    489498        {
    490499#if ROOT_VERSION_CODE < ROOT_VERSION(3,02,06)
  • trunk/MagicSoft/Mars/mbase/MTask.h

    r2206 r2454  
    7171    virtual void PrintStatistics(const Int_t lvl=0, Bool_t title=kFALSE) const;
    7272
    73     UInt_t GetNumExecutions() { return fNumExecutions; }
     73    UInt_t GetNumExecutions() const { return fNumExecutions; }
    7474
    7575    virtual Bool_t ReInit(MParList *pList);
  • trunk/MagicSoft/Mars/mbase/MTaskList.cc

    r2206 r2454  
    308308        if (!task->ReInit(pList?pList:fParList))
    309309        {
    310             *fLog << err << "ERROR - ReInit if Task " << task->GetDescriptor() << " failed." << endl;
     310            *fLog << err << "ERROR - ReInit of Task '" << task->GetDescriptor() << "' failed." << endl;
    311311            return kFALSE;
    312312        }
Note: See TracChangeset for help on using the changeset viewer.