Changeset 867 for trunk/MagicSoft/Mars/mbase
- Timestamp:
- 07/13/01 18:13:06 (23 years ago)
- Location:
- trunk/MagicSoft/Mars/mbase
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MEvtLoop.cc
r858 r867 105 105 106 106 if (fLog != &gLog) 107 {108 107 fParList ->SetLogStream(fLog); 109 fTaskList->SetLogStream(fLog);110 }111 108 112 109 // … … 180 177 << " --> " << (maxcnt<0?dummy:maxcnt)/clock.CpuTime() << " Events/s" 181 178 << endl << endl; 182 183 179 } 184 180 … … 188 184 // for developers use only! 189 185 // 190 voidMEvtLoop::PostProcess() const186 Bool_t MEvtLoop::PostProcess() const 191 187 { 192 188 // 193 189 // execute the post process of all tasks 194 190 // 195 fTaskList->PostProcess(); 196 } 197 198 // -------------------------------------------------------------------------- 199 // 200 // See class description above. 201 // 202 void MEvtLoop::Eventloop(Int_t maxcnt, const char *tlist) 203 { 204 if (!PreProcess(tlist)) 205 return; 206 207 Process(maxcnt); 208 209 PostProcess(); 210 } 211 191 return fTaskList->PostProcess(); 192 } 193 194 // -------------------------------------------------------------------------- 195 // 196 // See class description above. 197 // 198 Bool_t MEvtLoop::Eventloop(Int_t maxcnt, const char *tlist) 199 { 200 Bool_t rc = PreProcess(); 201 202 if (rc) 203 Process(maxcnt); 204 205 if (!PostProcess()) 206 return kFALSE; 207 208 return rc; 209 } 210 -
trunk/MagicSoft/Mars/mbase/MEvtLoop.h
r698 r867 35 35 Bool_t PreProcess(const char *tlist="MTaskList"); 36 36 void Process(Int_t maxcnt) const; 37 voidPostProcess() const;37 Bool_t PostProcess() const; 38 38 39 voidEventloop(Int_t maxcnt=-1, const char *tlist="MTaskList");39 Bool_t Eventloop(Int_t maxcnt=-1, const char *tlist="MTaskList"); 40 40 41 41 ClassDef(MEvtLoop, 0) // Class to execute the tasks in a tasklist -
trunk/MagicSoft/Mars/mbase/MParList.cc
r860 r867 199 199 // after the last appearance of a semicolon is stripped to get the 200 200 // Name of the Class. Normally this is used to number your objects. 201 // "Name;1", "Name;2", ... 201 // "Name;1", "Name;2", ... If a semicolon is detected leading dots 202 // are stripped from the object-name (eg. "name;5.") 202 203 // 203 204 MParContainer *MParList::FindCreateObj(const char *classname, const char *objname) … … 223 224 const char *semicolon = strrchr(cname, ';'); 224 225 226 TString oname(objname); 227 225 228 if (semicolon) 229 { 226 230 cname.Remove(semicolon-cname); 231 232 // 233 // Remove leading dots from objectname (eg. "MMcTrig;5.") 234 // 235 Int_t sz = oname.Sizeof()-2; 236 237 while (sz>=0 && oname[sz]=='.') 238 oname.Remove(sz--); 239 } 227 240 228 241 // … … 230 243 // in the List. If we can find one we are done. 231 244 // 232 MParContainer *pcont = (MParContainer*)FindObject(o bjname);245 MParContainer *pcont = (MParContainer*)FindObject(oname); 233 246 234 247 if (pcont) … … 238 251 // if object is not existing in the list try to create one 239 252 // 240 *fLog << dbginf << "Object '" << o bjname << "' of type '" << cname << "' not found... creating." << endl;253 *fLog << dbginf << "Object '" << oname << "' of type '" << cname << "' not found... creating." << endl; 241 254 242 255 // … … 263 276 // set the new object name of the object 264 277 // 265 pcont->SetName(o bjname);278 pcont->SetName(oname); 266 279 267 280 // -
trunk/MagicSoft/Mars/mbase/MReadTree.cc
r858 r867 173 173 // we cannot proceed reading this branch 174 174 // 175 *fLog << "MReadTree::PreProcess -Warning: Class '" << name << "' not existing in dictionary. Branch skipped." << endl;175 *fLog << dbginf << "Warning: Class '" << name << "' not existing in dictionary. Branch skipped." << endl; 176 176 continue; 177 177 } -
trunk/MagicSoft/Mars/mbase/MTask.h
r858 r867 22 22 const MFilter *fFilter; 23 23 24 Bool_t fIsPreprocessed; // Indicates the success of the PreProcessing (set by MTaskList) 25 24 26 public: 25 MTask() : fFilter(NULL) {}27 MTask() : fFilter(NULL), fIsPreprocessed(kFALSE) {} 26 28 ~MTask() 27 29 { … … 30 32 const MFilter *GetFilter() const { return fFilter; } 31 33 void SetFilter(const MFilter *filter) { fFilter=filter; } 34 35 Bool_t IsPreprocessed() const { return fIsPreprocessed; } 36 void SetIsPreprocessed(Bool_t state=kTRUE) { fIsPreprocessed = state; } 32 37 33 38 virtual Bool_t PreProcess(MParList *pList); -
trunk/MagicSoft/Mars/mbase/MTaskList.cc
r860 r867 193 193 if (!task->PreProcess(fParList)) 194 194 return kFALSE; 195 196 task->SetIsPreprocessed(); 195 197 } 196 198 … … 307 309 while ( (task=(MTask*)Next()) ) 308 310 { 311 if (!task->IsPreprocessed()) 312 continue; 313 309 314 *fLog << task->GetName() << "... " << flush; 310 315
Note:
See TracChangeset
for help on using the changeset viewer.