Changeset 7601
- Timestamp:
- 03/14/06 14:46:06 (19 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MContinue.cc
r7058 r7601 160 160 GetFilter()->SetDisplay(fDisplay); 161 161 GetFilter()->SetLogStream(fLog); 162 GetFilter()->SetAccelerator(GetAccelerator()); 162 163 163 164 // Remeber that the filter is not already in tasklist -
trunk/MagicSoft/Mars/mbase/MTask.cc
r7553 r7601 115 115 MTask::MTask(const char *name, const char *title) 116 116 : fFilter(NULL), fSerialNumber(0), fIsPreprocessed(kFALSE), 117 fStopwatch(0), fNumExec 0(0), fAccelerator(0)117 fStopwatch(0), fNumExecutions(0), fNumExec0(0), fAccelerator(0) 118 118 { 119 119 fName = name ? name : "MTask"; … … 216 216 // This does not reset the counter! 217 217 fStopwatch->Reset(); 218 fNumExecutions = 0; 218 219 fNumExec0 = GetNumExecutionsTotal(); 219 220 … … 247 248 // return value. 248 249 // If Process is executed, the execution counter is increased. 249 // Count cpu consum tion time.250 // Count cpu consumption time. 250 251 // 251 252 Int_t MTask::CallProcess() … … 256 257 // this task. 257 258 // 258 const Bool_t exec = fFilter ? fFilter->IsConditionTrue() : kTRUE; 259 if (!exec) 259 if (fFilter && !fFilter->IsConditionTrue()) 260 260 return kTRUE; 261 261 262 if (!HasAccelerator(kAccDont Count|kAccDontTime))262 if (!HasAccelerator(kAccDontTime)) 263 263 fStopwatch->Start(kFALSE); 264 265 fNumExecutions++; 266 264 267 const Int_t rc = Process(); 268 265 269 if (!HasAccelerator(kAccDontTime)) 266 270 fStopwatch->Stop(); … … 381 385 UInt_t MTask::GetNumExecutionsTotal() const 382 386 { 383 return (UInt_t)fStopwatch->Counter()-1;387 return fNumExecutions-1; 384 388 } 385 389 … … 436 440 if (HasStreamId()) 437 441 *fLog << GetStreamId() << ":"; 438 *fLog << GetDescriptor() << "\t"; 439 440 if (HasAccelerator(kAccDontCount)) 441 *fLog << "-/-"; 442 else 443 *fLog << dec << GetNumExecutions(); 442 *fLog << GetDescriptor() << "\t" << dec << GetNumExecutions(); 444 443 445 444 if (fFilter) -
trunk/MagicSoft/Mars/mbase/MTask.h
r7554 r7601 25 25 enum { 26 26 kAccStandard = 0, 27 kAccDontCount = BIT(1), 28 kAccDontTime = BIT(2), 29 kAccDontReset = BIT(3) 27 kAccDontTime = BIT(1), 28 kAccDontReset = BIT(2) 30 29 }; 31 30 32 31 private: 33 TList *fListOfBranches; //! List of Branch names for auto enabeling scheme32 TList *fListOfBranches; //! List of Branch names for auto enabeling scheme 34 33 35 MFilter *fFilter; // Filter for conditional task execution36 Byte_t fSerialNumber; // Serial number having more than one detector of the same type34 MFilter *fFilter; // Filter for conditional task execution 35 Byte_t fSerialNumber; // Serial number having more than one detector of the same type 37 36 38 Bool_t fIsPreprocessed; //! Indicates the success of the PreProcessing (set by MTaskList)37 Bool_t fIsPreprocessed; //! Indicates the success of the PreProcessing (set by MTaskList) 39 38 40 TStopwatch *fStopwatch; //! Count the execution time and number of executions 41 UInt_t fNumExec0; //! Total number of executions at PreProcess 42 Byte_t fAccelerator; //! 39 TStopwatch *fStopwatch; //! Count the execution time and number of executions 40 UInt_t fNumExecutions; //! Number of executions (also counted by fStopwatch, but faster) 41 UInt_t fNumExec0; //! Total number of executions at PreProcess 42 Byte_t fAccelerator; //! 43 43 44 44 virtual Int_t PreProcess(MParList *pList); -
trunk/MagicSoft/Mars/mbase/MTaskEnv.cc
r6278 r7601 143 143 144 144 *fLog << fTask->ClassName() << " <MTaskEnv>... " << flush; 145 146 fTask->SetAccelerator(GetAccelerator()); 145 147 return fTask->CallPreProcess(list); 146 148 } -
trunk/MagicSoft/Mars/mfbase/MF.cc
r7200 r7601 364 364 } 365 365 366 fF->SetAccelerator(GetAccelerator()); 367 366 368 if (!fF->CallPreProcess(plist)) 367 369 { -
trunk/MagicSoft/Mars/mfbase/MFilterList.cc
r6240 r7601 262 262 } 263 263 264 void MFilterList::SetAccelerator(Byte_t acc) 265 { 266 fFilters.ForEach(MTask, SetAccelerator)(acc); 267 MFilter::SetAccelerator(acc); 268 } 269 264 270 // -------------------------------------------------------------------------- 265 271 // … … 276 282 // 277 283 while ((filter=(MFilter*)Next())) 284 { 285 filter->SetAccelerator(GetAccelerator()); 278 286 if (!filter->CallPreProcess(pList)) 279 287 { … … 282 290 return kFALSE; 283 291 } 292 } 284 293 285 294 return kTRUE; -
trunk/MagicSoft/Mars/mfbase/MFilterList.h
r6240 r7601 59 59 Int_t PostProcess(); 60 60 61 void SetAccelerator(Byte_t acc=kAccStandard); 62 61 63 void SetVariables(const TArrayD &arr); 62 64 -
trunk/MagicSoft/Mars/mjobs/MJCut.cc
r7594 r7601 487 487 // by setting it here it is distributed to all consecutive tasks 488 488 tlist.SetAccelerator(MTask::kAccDontReset|MTask::kAccDontTime); 489 read.SetAccelerator();//MTask::kAccDontReset|MTask::kAccDontCount);490 489 491 490 // Create and setup the eventloop
Note:
See TracChangeset
for help on using the changeset viewer.