Ignore:
Timestamp:
11/15/01 11:07:21 (23 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r1076 r1080  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
    1919!
    2020!   Copyright: MAGIC Software Development, 2000-2001
     
    4343// from the list.                                                          //
    4444//                                                                         //
     45// Warning:                                                                //
     46//  Be carefull if you are writing your tasklist                           //
     47//  (eg. MWriteRootFile("file.root", "MTaskList")) to a file. You may      //
     48//  not be able to initialize a new working tasklist from a file if        //
     49//   a) Two Paramerer containers with the same names are existing in the   //
     50//      MParList.                                                          //
     51//   b) You used a container somewhere which is not part of MParList.      //
     52//      (eg. You specified a pointer to a MH container in MFillH which is  //
     53//      not added to the parameter list.                                   //
     54//                                                                         //
    4555/////////////////////////////////////////////////////////////////////////////
    4656
     
    6878    fTitle = title ? title : "A list for tasks to be executed";
    6979
    70     fTasks = new TOrdCollection;
     80    fTasks = new TList; //OrdCollection;
    7181}
    7282
     
    151161        if (objt || objn==task)
    152162        {
    153             *fLog << dbginf << "Warning: Task '" << task->GetName() << ", 0x" << (void*)task;
     163            *fLog << warn << dbginf << "Warning: Task '" << task->GetName() << ", 0x" << (void*)task;
    154164            *fLog << "' already existing in '" << GetName() << "'... ignoring." << endl;
    155165            return kTRUE;
     
    159169        // Otherwise add it to the list, but print a warning message
    160170        //
    161         *fLog << dbginf << "Warning: Task '" << task->GetName();
     171        *fLog << warn << dbginf << "Warning: Task '" << task->GetName();
    162172        *fLog << "' already existing in '" << GetName() << "'." << endl;
    163173        *fLog << "You may not be able to get a pointer to this task by name." << endl;
     
    168178        if (!fTasks->FindObject(where))
    169179        {
    170             *fLog << dbginf << "Error: Cannot find task after which the new task should be scheduled!" << endl;
     180            *fLog << err << dbginf << "Error: Cannot find task after which the new task should be scheduled!" << endl;
    171181            return kFALSE;
    172182        }
    173183    }
    174184
    175     *fLog << "Adding " << name << " to " << GetName() << " for " << type << "... " << flush;
     185    *fLog << inf << "Adding " << name << " to " << GetName() << " for " << type << "... " << flush;
    176186
    177187    task->SetStreamId(type);
     
    208218Bool_t MTaskList::PreProcess(MParList *pList)
    209219{
    210     *fLog << "Preprocessing... " << flush;
     220    *fLog << all << "Preprocessing... " << flush;
    211221
    212222    fParList = pList;
     
    224234    while ((task=(MTask*)Next()))
    225235    {
    226         *fLog << task->GetName() << "... " << flush;
     236        *fLog << all << task->GetName() << "... " << flush;
    227237
    228238        if (!task->CallPreProcess(fParList))
     
    297307
    298308        default:
    299             *fLog << "MTaskList::Process: Unknown return value from MTask::Process()... ignored." << endl;
     309            *fLog << warn << "MTaskList::Process: Unknown return value from MTask::Process()... ignored." << endl;
    300310        }
    301311    }
     
    310320Bool_t MTaskList::PostProcess()
    311321{
    312     *fLog << "Postprocessing... " << flush;
     322    *fLog << all << "Postprocessing... " << flush;
    313323
    314324    //
     
    338348            return kFALSE;
    339349
    340         *fLog << task->GetName() << "... " << flush;
    341     }
    342 
    343     *fLog << endl;
     350        *fLog << all << task->GetName() << "... " << flush;
     351    }
     352
     353    *fLog << all << endl;
    344354
    345355    return kTRUE;
     
    357367    if (lvl==0)
    358368    {
    359         *fLog << endl;
     369        *fLog << all << endl;
    360370        *fLog << "Execution Statistics: " << endl;
    361371        *fLog << "---------------------" << endl;
     
    379389void MTaskList::Print(Option_t *t) const
    380390{
    381     *fLog << GetDescriptor() << " <" << GetTitle() << ">" << endl;
     391    *fLog << all << endl;
     392    *fLog << GetDescriptor() << endl;
     393    *fLog << setfill('-') << setw(strlen(GetDescriptor())) << "" << endl;
    382394
    383395    fTasks->Print();
Note: See TracChangeset for help on using the changeset viewer.