Changeset 599 for trunk/MagicSoft/Mars/mbase
- Timestamp:
- 02/19/01 16:36:16 (24 years ago)
- Location:
- trunk/MagicSoft/Mars/mbase
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MEvtLoop.cc
r458 r599 46 46 } 47 47 48 void MEvtLoop::Eventloop(Int_t maxcnt, const char *ftasks)48 Bool_t MEvtLoop::PreProcess(const char *tlist) 49 49 { 50 // See class description above. 50 // 51 // The proprocessing part of the eventloop. Be careful, this is 52 // for developers use only! 53 // 51 54 52 55 // … … 56 59 { 57 60 cout << "MEvtLoop::Eventloop - Error: Parlist not initialized." << endl; 58 return ;61 return kFALSE; 59 62 } 60 63 … … 63 66 // the default name is "MTaskList" 64 67 // 65 MTaskList *tasks = (MTaskList*)fParlist->FindObject(ftasks);66 if (! tasks)68 fTaskList = (MTaskList*)fParlist->FindObject(tlist); 69 if (!fTaskList) 67 70 { 68 cout << "MEvtLoop::Eventloop - Error: Cannot find tasklist '" << ftasks<< "' in parameter list." << endl;69 return ;71 cout << "MEvtLoop::Eventloop - Error: Cannot find tasklist '" << tlist << "' in parameter list." << endl; 72 return kFALSE; 70 73 } 71 74 … … 75 78 // the parameter list 76 79 // 77 if (! tasks->PreProcess(fParlist))80 if (!fTaskList->PreProcess(fParlist)) 78 81 { 79 82 cout << "Error detected while PreProcessing" << endl; 80 return ;83 return kFALSE; 81 84 } 85 86 return kTRUE; 87 } 88 89 void MEvtLoop::Process(Int_t maxcnt) const 90 { 91 // 92 // The processing part of the eventloop. Be careful, this is 93 // for developers use only! 94 // 82 95 83 96 // … … 108 121 // 109 122 if (maxcnt<0) 110 while ( tasks->Process() && ++dummy);123 while (fTaskList->Process() && ++dummy); 111 124 else 112 while ( tasks->Process() && dummy--);125 while (fTaskList->Process() && dummy--); 113 126 114 127 // … … 127 140 << endl << endl; 128 141 142 } 143 144 void MEvtLoop::PostProcess() const 145 { 146 // 147 // The postprocessing part of the eventloop. Be careful, this is 148 // for developers use only! 149 // 150 129 151 // 130 152 // execute the post process of all tasks 131 153 // 132 tasks->PostProcess();154 fTaskList->PostProcess(); 133 155 } 134 156 157 void MEvtLoop::Eventloop(Int_t maxcnt, const char *tlist) 158 { 159 // See class description above. 160 161 if (!PreProcess(tlist)) 162 return; 163 164 Process(maxcnt); 165 166 PostProcess(); 167 } 168 -
trunk/MagicSoft/Mars/mbase/MEvtLoop.h
r458 r599 15 15 16 16 class MParList; 17 class MTaskList; 17 18 18 19 class MEvtLoop … … 20 21 private: 21 22 MParList *fParlist; 23 MTaskList *fTaskList; 22 24 23 25 public: … … 27 29 void SetParList(MParList *p); 28 30 31 Bool_t PreProcess(const char *tlist="MTaskList"); 32 void Process(Int_t maxcnt) const; 33 void PostProcess() const; 34 29 35 void Eventloop(Int_t maxcnt=-1, const char *tlist="MTaskList"); 30 36
Note:
See TracChangeset
for help on using the changeset viewer.