Changeset 2015 for trunk/MagicSoft/Mars/mbase/MTaskList.cc
- Timestamp:
- 04/28/03 09:52:57 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MTaskList.cc
r1965 r2015 60 60 61 61 #include <TClass.h> 62 #include <TBaseClass.h>63 62 #include <TOrdCollection.h> 64 63 … … 322 321 // -------------------------------------------------------------------------- 323 322 // 324 // Check whether this task (or one of it's base classes) overloads325 // MTask::Process. Only if this function is overloaded this task is326 // added to the fTaskProcess-List. This makes the execution of the327 // tasklist a little bit (only a little bit) faster, bacause tasks328 // doing no Processing are not Processed.329 //330 Bool_t MTaskList::CheckClassForProcess(TClass *cls)331 {332 //333 // Check whether the class itself overloads the Process function334 //335 if (cls->GetName()=="MTask")336 return kFALSE;337 338 if (cls->GetMethodAny("Process"))339 return kTRUE;340 341 //342 // If the class itself doesn't overload it check all it's base classes343 //344 TBaseClass *base=NULL;345 TIter NextBase(cls->GetListOfBases());346 while ((base=(TBaseClass*)NextBase()))347 {348 if (CheckClassForProcess(base->GetClassPointer()))349 return kTRUE;350 }351 352 return kFALSE;353 }354 355 // --------------------------------------------------------------------------356 //357 323 // do pre processing (before eventloop) of all tasks in the task-list 324 // Only if a task overwrites the Process function the task is 325 // added to the fTaskProcess-List. This makes the execution of the 326 // tasklist a little bit (only a little bit) faster, bacause tasks 327 // doing no Processing are not Processed. 358 328 // 359 329 Bool_t MTaskList::PreProcess(MParList *pList) … … 410 380 // 411 381 while ((task=(MTask*)Next())) 412 if ( CheckClassForProcess(task->IsA()))382 if (task->OverwritesProcess()) 413 383 fTasksProcess.Add(task); 414 384
Note:
See TracChangeset
for help on using the changeset viewer.