Ignore:
Timestamp:
10/31/01 14:38:20 (23 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r967 r1020  
    5656#include <iostream.h>
    5757
     58#include <TSystem.h>
    5859#include <TStopwatch.h>
     60#include <TGProgressBar.h>
    5961
    6062#include "MLog.h"
     
    7678// default constructor - emty
    7779//
    78 MEvtLoop::MEvtLoop() : fParList(NULL)
     80MEvtLoop::MEvtLoop() : fParList(NULL), fProgress(NULL)
    7981{
    8082}
     
    166168    *fLog << " events)..." << flush;
    167169
     170    if (fProgress && maxcnt>0)
     171        fProgress->SetRange(0, maxcnt);
     172
    168173    Int_t dummy = maxcnt<0 ? 0 : maxcnt;
    169174
     
    181186    if (maxcnt<0)
    182187        // process first and increment if sucessfull
    183         while (fTaskList->Process()) dummy++;
     188        if (fProgress)
     189            while (fTaskList->Process())
     190            {
     191                fProgress->SetPosition(++dummy);
     192                gSystem->ProcessEvents();
     193            }
     194        else
     195            while (fTaskList->Process()) dummy++;
    184196    else
    185197        // check for number and break if unsuccessfull
    186         while (dummy-- && fTaskList->Process());
     198        if (fProgress)
     199            while (dummy-- && fTaskList->Process())
     200            {
     201                fProgress->SetPosition(maxcnt - dummy);
     202                gSystem->ProcessEvents();
     203            }
     204        else
     205            while (dummy-- && fTaskList->Process());
    187206
    188207    //
Note: See TracChangeset for help on using the changeset viewer.