Changeset 1657 for trunk/MagicSoft/Mars/mbase
- Timestamp:
- 11/21/02 10:16:52 (22 years ago)
- Location:
- trunk/MagicSoft/Mars/mbase
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MAGIC.h
r1450 r1657 18 18 const Int_t kCONTINUE = 2; 19 19 const Int_t kSKIP = 2; 20 const Int_t kERROR = 3; 20 21 21 22 // -
trunk/MagicSoft/Mars/mbase/MEvtLoop.cc
r1600 r1657 191 191 // for developers or use in special jobs only! 192 192 // 193 voidMEvtLoop::Process(Int_t maxcnt) const193 Bool_t MEvtLoop::Process(Int_t maxcnt) const 194 194 { 195 195 // … … 233 233 // else only maxcnt events are processed 234 234 // 235 Bool_t rc = kTRUE; 235 236 if (maxcnt<0) 236 237 // process first and increment if sucessfull 237 238 if (fProgress) 238 while ( fTaskList->Process())239 while ((rc=fTaskList->Process())==kTRUE) 239 240 { 240 241 fProgress->SetPosition(++dummy); … … 246 247 } 247 248 else 248 while ( fTaskList->Process()) dummy++;249 while ((rc=fTaskList->Process())==kTRUE) dummy++; 249 250 else 250 251 // check for number and break if unsuccessfull 251 252 if (fProgress) 252 while (dummy-- && fTaskList->Process())253 while (dummy-- && (rc=fTaskList->Process())==kTRUE) 253 254 { 254 255 fProgress->SetPosition(maxcnt - dummy); … … 260 261 } 261 262 else 262 while (dummy-- && fTaskList->Process());263 while (dummy-- && (rc=fTaskList->Process())==kTRUE); 263 264 264 265 // … … 279 280 << " --> " << (maxcnt<0?dummy:maxcnt)/clock.RealTime() << " Events/s" 280 281 << endl << endl; 282 283 return rc!=kERROR; 281 284 } 282 285 … … 306 309 // 307 310 if (rc) 308 Process(maxcnt);311 rc = Process(maxcnt); 309 312 310 313 // -
trunk/MagicSoft/Mars/mbase/MEvtLoop.h
r1540 r1657 52 52 53 53 Bool_t PreProcess(const char *tlist="MTaskList"); 54 voidProcess(Int_t maxcnt) const;54 Bool_t Process(Int_t maxcnt) const; 55 55 Bool_t PostProcess() const; 56 56 -
trunk/MagicSoft/Mars/mbase/MTask.cc
r1574 r1657 56 56 // are executed. A task can return kFALSE to // 57 57 // stop the execuition of the tasklist or // 58 // kCONTINUE to skip the pending tasks. // 58 // kCONTINUE to skip the pending tasks. If you want // 59 // to stop the eventloop and wants the eventloop to // 60 // return the status 'failed' return kERROR. // 59 61 // // 60 62 // - PostProcess(): executed after the eventloop. Here you can close // -
trunk/MagicSoft/Mars/mbase/MTaskList.cc
r1542 r1657 426 426 break; 427 427 428 case kERROR: 429 // 430 // an error occured: stop eventloop and return: failed 431 // 432 *fLog << err << dbginf << "Fatal error occured... stopped." << endl; 433 rc = kERROR; 434 break; 435 428 436 case kCONTINUE: 429 437 // … … 434 442 435 443 default: 436 *fLog << warn << "MTaskList::Process:Unknown return value from MTask::Process()... ignored." << endl;444 *fLog << warn << dbginf << "Unknown return value from MTask::Process()... ignored." << endl; 437 445 continue; 438 446 }
Note:
See TracChangeset
for help on using the changeset viewer.