Ignore:
Timestamp:
03/15/04 12:04:09 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r2958 r3497  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@astro.uni-wuerzburg.de>
    1919!
    20 !   Copyright: MAGIC Software Development, 2000-2001
     20!   Copyright: MAGIC Software Development, 2000-2004
    2121!
    2222!
     
    2424
    2525/////////////////////////////////////////////////////////////////////////////
    26 //                                                                         //
    27 // MTaskList                                                               //
    28 //                                                                         //
    29 // Collection of tasks.                                                    //
    30 //                                                                         //
    31 // A tasklist is necessary to run the eventloop. It contains the scheduled //
    32 // tasks, which should be executed in your program.                        //
    33 //                                                                         //
    34 // To add a task use AddToList.                                            //
    35 //                                                                         //
    36 // The tasklist itself is a task, too. You can add a tasklist to another   //
    37 // tasklist. This makes sense, if you want to filter the execution of      //
    38 // more than one task of your tasklist using the same filter.              //
    39 //                                                                         //
    40 // The tasks in the list are idetified by their names. If more than one    //
    41 // task has the same name, the tasklist will still work correctly, but     //
    42 // you might run into trouble trying to get a pointer to a task by name    //
    43 // from the list.                                                          //
    44 //                                                                         //
    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 //                                                                         //
     26//
     27// MTaskList
     28//
     29// Collection of tasks.
     30//
     31// A tasklist is necessary to run the eventloop. It contains the scheduled
     32// tasks, which should be executed in your program.
     33//
     34// To add a task use AddToList.
     35//
     36// The tasklist itself is a task, too. You can add a tasklist to another
     37// tasklist. This makes sense, if you want to filter the execution of
     38// more than one task of your tasklist using the same filter.
     39//
     40// The tasks in the list are idetified by their names. If more than one
     41// task has the same name, the tasklist will still work correctly, but
     42// you might run into trouble trying to get a pointer to a task by name
     43// from the list.
     44//
     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//
    5555/////////////////////////////////////////////////////////////////////////////
    56 
    5756#include "MTaskList.h"
    5857
    59 #include <fstream>        // ofstream, SavePrimitive
    60 
    61 #include <TClass.h>
    62 #include <TSystem.h>        // gSystem
    63 #include <TOrdCollection.h>
     58#include <fstream>           // ofstream, SavePrimitive
     59
     60#include <TSystem.h>         // gSystem
     61#include <TOrdCollection.h>  // TOrdCollection
    6462
    6563#include "MLog.h"
     
    627625//  Use MTaskList::PrintStatistics without an argument.
    628626//
    629 void MTaskList::PrintStatistics(const Int_t lvl, Bool_t title) const
     627void MTaskList::PrintStatistics(const Int_t lvl, Bool_t title, Double_t time) const
    630628{
    631629    if (lvl==0)
    632630    {
    633         *fLog << all << underline << "Execution Statistics:" << endl;
     631        *fLog << all << underline << "Process execution Statistics:" << endl;
    634632        *fLog << GetDescriptor();
    635633        if (GetFilter())
     
    640638    }
    641639    else
    642         MTask::PrintStatistics(lvl, title);
     640        MTask::PrintStatistics(lvl, title, time);
    643641
    644642    //
    645643    //  create the Iterator for the TaskList
    646644    //
    647     fTasks->ForEach(MTask, PrintStatistics)(lvl+1, title);
     645    fTasks->ForEach(MTask, PrintStatistics)(lvl+1, title, GetCpuTime());
    648646
    649647    if (lvl==0)
     
    651649}
    652650
    653 
    654 // --------------------------------------------------------------------------
     651// --------------------------------------------------------------------------
     652//
     653// Call 'Print()' of all tasks
     654//
    655655void MTaskList::Print(Option_t *t) const
    656656{
Note: See TracChangeset for help on using the changeset viewer.