Changeset 3497 for trunk/MagicSoft/Mars/mbase/MTaskList.cc
- Timestamp:
- 03/15/04 12:04:09 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MTaskList.cc
r2958 r3497 16 16 ! 17 17 ! 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> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 120 ! Copyright: MAGIC Software Development, 2000-2004 21 21 ! 22 22 ! … … 24 24 25 25 ///////////////////////////////////////////////////////////////////////////// 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 // 55 55 ///////////////////////////////////////////////////////////////////////////// 56 57 56 #include "MTaskList.h" 58 57 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 64 62 65 63 #include "MLog.h" … … 627 625 // Use MTaskList::PrintStatistics without an argument. 628 626 // 629 void MTaskList::PrintStatistics(const Int_t lvl, Bool_t title ) const627 void MTaskList::PrintStatistics(const Int_t lvl, Bool_t title, Double_t time) const 630 628 { 631 629 if (lvl==0) 632 630 { 633 *fLog << all << underline << " Execution Statistics:" << endl;631 *fLog << all << underline << "Process execution Statistics:" << endl; 634 632 *fLog << GetDescriptor(); 635 633 if (GetFilter()) … … 640 638 } 641 639 else 642 MTask::PrintStatistics(lvl, title );640 MTask::PrintStatistics(lvl, title, time); 643 641 644 642 // 645 643 // create the Iterator for the TaskList 646 644 // 647 fTasks->ForEach(MTask, PrintStatistics)(lvl+1, title );645 fTasks->ForEach(MTask, PrintStatistics)(lvl+1, title, GetCpuTime()); 648 646 649 647 if (lvl==0) … … 651 649 } 652 650 653 654 // -------------------------------------------------------------------------- 651 // -------------------------------------------------------------------------- 652 // 653 // Call 'Print()' of all tasks 654 // 655 655 void MTaskList::Print(Option_t *t) const 656 656 {
Note:
See TracChangeset
for help on using the changeset viewer.