Ignore:
Timestamp:
04/19/02 14:39:41 (23 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r1270 r1280  
    261261//  do pre processing (before eventloop) of all tasks in the task-list
    262262//
     263#include <TMethod.h>
     264#include <TBaseClass.h>
    263265Bool_t MTaskList::PreProcess(MParList *pList)
    264266{
     
    283285        *fLog << all << task->GetName() << "... " << flush;
    284286
    285         TClass *cls=NULL;
     287        //
     288        // Check whether this task (or one of it's base classes) overloads
     289        // MTask::Process. Only if this function is overloaded this task is
     290        // added to the fTaskProcess-List. This makes the execution of the
     291        // tasklist a little bit (only a little bit) faster, bacause tasks
     292        // doing no Processing are not Processed.
     293        //
     294        TBaseClass *cls=NULL;
    286295        TIter NextBase(task->IsA()->GetListOfBases());
    287         while ((cls=(TClass*)NextBase()))
     296        while ((cls=(TBaseClass*)NextBase()))
    288297        {
    289298            if (cls->GetName()=="MTask")
    290299                break;
    291300
    292             if (!cls->GetMethodAny("Process"))
     301            if (!cls->GetClassPointer()->GetMethodAny("Process"))
    293302                continue;
    294303
     
    297306        }
    298307
     308        //
     309        // PreProcess the task and check for it's return value.
     310        //
    299311        switch (task->CallPreProcess(fParList))
    300312        {
     
    326338Bool_t MTaskList::Process()
    327339{
     340    //
     341    // Check whether there is something which can be processed, otherwise
     342    // stop the eventloop.
     343    //
     344    if (fTasksProcess.GetSize()==0)
     345    {
     346        *fLog << warn << "Warning: No entries in " << GetDescriptor() << " for Processing." << endl;
     347        return kFALSE;
     348    }
     349
    328350    //
    329351    // Reset the ReadyToSave flag.
     
    385407        }
    386408    }
     409
    387410    return kTRUE;
    388411}
Note: See TracChangeset for help on using the changeset viewer.