Changeset 1657 for trunk/MagicSoft
- Timestamp:
- 11/21/02 10:16:52 (22 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r1653 r1657 1 1 -*-*- END -*-*- 2 2002/11/21: Thomas Bretz 3 4 * mbase/MAGIC.h, mbase/MEvtLoop.[h,cc], MTask.cc, MTaskList.cc: 5 - introduced kERROR to stop an eventloop with an error 6 7 8 2 9 2002/11/20: Abelardo Moralejo 3 10 … … 6 13 error message. 7 14 15 16 8 17 2002/11/19: Abelardo Moralejo 9 18 … … 11 20 - Removed some strange pieces of text which somehow got into the 12 21 file (anyone knows how?) 22 23 13 24 14 25 2002/11/19: Thomas Bretz … … 24 35 - removed also the corresponding AddToList for the tasklist 25 36 37 38 26 39 2002/11/19: Abelardo Moralejo 27 40 … … 29 42 - Added 2nd argument to write an output file containing the 30 43 collection area histogram. 44 31 45 32 46 -
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.