Changeset 1020 for trunk/MagicSoft/Mars/mbase/MEvtLoop.cc
- Timestamp:
- 10/31/01 14:38:20 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MEvtLoop.cc
r967 r1020 56 56 #include <iostream.h> 57 57 58 #include <TSystem.h> 58 59 #include <TStopwatch.h> 60 #include <TGProgressBar.h> 59 61 60 62 #include "MLog.h" … … 76 78 // default constructor - emty 77 79 // 78 MEvtLoop::MEvtLoop() : fParList(NULL) 80 MEvtLoop::MEvtLoop() : fParList(NULL), fProgress(NULL) 79 81 { 80 82 } … … 166 168 *fLog << " events)..." << flush; 167 169 170 if (fProgress && maxcnt>0) 171 fProgress->SetRange(0, maxcnt); 172 168 173 Int_t dummy = maxcnt<0 ? 0 : maxcnt; 169 174 … … 181 186 if (maxcnt<0) 182 187 // 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++; 184 196 else 185 197 // 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()); 187 206 188 207 //
Note:
See TracChangeset
for help on using the changeset viewer.