Ignore:
Timestamp:
05/03/06 08:24:21 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mbase
Files:
2 edited

Legend:

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

    r7554 r7682  
    314314// --------------------------------------------------------------------------
    315315//
     316// Add all objects in list to the tasklist. If some of them do not
     317// inherit from MTask return kFALSE, also if AddToList returns an error
     318// for one of the tasks
     319//
     320Bool_t MTaskList::AddToList(const TList &list)
     321{
     322    TIter Next(&list);
     323    TObject *obj=0;
     324    while ((obj=Next()))
     325    {
     326        if (!obj->InheritsFrom(MTask::Class()))
     327        {
     328            *fLog << err << "ERROR - Object " << obj->GetName() << " doesn't inherit from MTask..." << endl;
     329            return kFALSE;
     330        }
     331
     332        if (!AddToList(obj))
     333            return kFALSE;
     334    }
     335    return kTRUE;
     336}
     337
     338// --------------------------------------------------------------------------
     339//
    316340//  Find an object in the list.
    317341//  'name' is the name of the object you are searching for.
  • trunk/MagicSoft/Mars/mbase/MTaskList.h

    r7554 r7682  
    4747    Bool_t AddToListAfter(MTask *task, const MTask *where, const char *tType="All");
    4848    Bool_t AddToList(MTask *task, const char *tType="All");
     49    Bool_t AddToList(const TList &list);
    4950
    5051    void SetSerialNumber(Byte_t num);
Note: See TracChangeset for help on using the changeset viewer.