Changeset 1003 for trunk/MagicSoft/Mars/mbase/MTask.cc
- Timestamp:
- 10/29/01 11:15:53 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MTask.cc
r988 r1003 67 67 #include "MTask.h" 68 68 69 #include <TOrdCollection.h> 70 69 71 #include "MLog.h" 70 72 #include "MLogManip.h" … … 75 77 76 78 MTask::MTask(const char *name, const char *title) 77 : fFilter(NULL), fIsPreprocessed(kFALSE), fNumExecutions() 78 { 79 *fName = name ? name : "MTask"; 80 *fTitle = title ? title : "Base class for all tasks (dummy task)."; 79 : fFilter(NULL), fIsPreprocessed(kFALSE), fNumExecutions(0) 80 { 81 fName = name ? name : "MTask"; 82 fTitle = title ? title : "Base class for all tasks (dummy task)."; 83 84 fListOfBranches = new TOrdCollection; 85 fListOfBranches->SetOwner(); 86 } 87 88 MTask::~MTask() 89 { 90 delete fListOfBranches; 91 } 92 93 // -------------------------------------------------------------------------- 94 // 95 // This adds a branch to the list for the auto enabeling schmeme. 96 // This makes it possible for MReadTree to decide which branches 97 // are really needed for the eventloop. Only the necessary branches 98 // are read from disk which speeds up the calculation enormously. 99 // 100 // You can use TRegExp expressions like "*.fEnergy", but the 101 // recommended method is to call this function for exactly all 102 // branches you want to have, eg: 103 // AddToBranchList("MMcTrig;1.fNumFirstLevel"); 104 // AddToBranchList("MMcTrig;2.fNumFirstLevel"); 105 // 106 // We agreed on the convetion, that all branches are stored with 107 // a trailing dot '.' so that always the Master Branch name 108 // (eg. MMcTrig) is part of the branch name. 109 // 110 // Remark: The common place to call AddToBranchList is the 111 // constructor of the derived classes (tasks) 112 // 113 void MTask::AddToBranchList(const char *b) 114 { 115 TNamed *name = new TNamed(b, ""); 116 fListOfBranches->Add(name); 117 } 118 119 // -------------------------------------------------------------------------- 120 // 121 // Copy constructor. 122 // 123 MTask::MTask(MTask &t) 124 { 125 fFilter = t.fFilter; 126 fListOfBranches->AddAll(t.fListOfBranches); 81 127 } 82 128
Note:
See TracChangeset
for help on using the changeset viewer.