Ignore:
Timestamp:
09/17/04 15:17:13 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mbase
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mbase/MTask.cc

    r5100 r5101  
    202202{
    203203    // This does not reset the counter!
    204     // fStopwatch->Reset();
    205 
    206     delete fStopwatch;
    207     fStopwatch = new TStopwatch;
     204    fStopwatch->Reset();
     205    fNumExec0 = GetNumExecutionsTotal();
    208206
    209207    *fLog << all << fName << "... " << flush;
     
    354352// --------------------------------------------------------------------------
    355353//
     354//  Return the total number of calls to since PreProcess(). If Process() was
     355//  not called due to a set filter this is not counted.
     356//
     357UInt_t MTask::GetNumExecutions() const
     358{
     359    return GetNumExecutionsTotal()-fNumExec0;
     360}
     361
     362// --------------------------------------------------------------------------
     363//
    356364//  Return the total number of calls to Process(). If Process() was not
    357365//  called due to a set filter this is not counted.
    358366//
    359 UInt_t MTask::GetNumExecutions() const
     367UInt_t MTask::GetNumExecutionsTotal() const
    360368{
    361369    return (UInt_t)fStopwatch->Counter()-1;
  • trunk/MagicSoft/Mars/mbase/MTask.h

    r4991 r5101  
    3131
    3232    TStopwatch *fStopwatch; //! Count the execution time and number of executions
     33    UInt_t      fNumExec0;  //! Total number of executions at PreProcess
    3334
    3435    virtual Int_t PreProcess(MParList *pList);
     
    9293    // Task execution statistics
    9394    UInt_t   GetNumExecutions() const;
     95    UInt_t   GetNumExecutionsTotal() const;
    9496    Double_t GetCpuTime() const;
    9597    Double_t GetRealTime() const;
Note: See TracChangeset for help on using the changeset viewer.