Changeset 7601


Ignore:
Timestamp:
Mar 14, 2006, 2:46:06 PM (14 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
8 edited

Legend:

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

    r7058 r7601  
    160160    GetFilter()->SetDisplay(fDisplay);
    161161    GetFilter()->SetLogStream(fLog);
     162    GetFilter()->SetAccelerator(GetAccelerator());
    162163
    163164    // Remeber that the filter is not already in tasklist
  • trunk/MagicSoft/Mars/mbase/MTask.cc

    r7553 r7601  
    115115MTask::MTask(const char *name, const char *title)
    116116    : fFilter(NULL), fSerialNumber(0), fIsPreprocessed(kFALSE),
    117     fStopwatch(0), fNumExec0(0), fAccelerator(0)
     117    fStopwatch(0), fNumExecutions(0), fNumExec0(0), fAccelerator(0)
    118118{
    119119    fName  = name  ? name  : "MTask";
     
    216216    // This does not reset the counter!
    217217    fStopwatch->Reset();
     218    fNumExecutions = 0;
    218219    fNumExec0 = GetNumExecutionsTotal();
    219220
     
    247248// return value.
    248249// If Process is executed, the execution counter is increased.
    249 // Count cpu consumtion time.
     250// Count cpu consumption time.
    250251//
    251252Int_t MTask::CallProcess()
     
    256257    // this task.
    257258    //
    258     const Bool_t exec = fFilter ? fFilter->IsConditionTrue() : kTRUE;
    259     if (!exec)
     259    if (fFilter && !fFilter->IsConditionTrue())
    260260        return kTRUE;
    261261
    262     if (!HasAccelerator(kAccDontCount|kAccDontTime))
     262    if (!HasAccelerator(kAccDontTime))
    263263        fStopwatch->Start(kFALSE);
     264
     265    fNumExecutions++;
     266
    264267    const Int_t rc = Process();
     268
    265269    if (!HasAccelerator(kAccDontTime))
    266270        fStopwatch->Stop();
     
    381385UInt_t MTask::GetNumExecutionsTotal() const
    382386{
    383     return (UInt_t)fStopwatch->Counter()-1;
     387    return fNumExecutions-1;
    384388}
    385389
     
    436440    if (HasStreamId())
    437441        *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();
    444443
    445444    if (fFilter)
  • trunk/MagicSoft/Mars/mbase/MTask.h

    r7554 r7601  
    2525    enum {
    2626        kAccStandard  = 0,
    27         kAccDontCount = BIT(1),
    28         kAccDontTime  = BIT(2),
    29         kAccDontReset = BIT(3)
     27        kAccDontTime  = BIT(1),
     28        kAccDontReset = BIT(2)
    3029    };
    3130
    3231private:
    33     TList *fListOfBranches; //! List of Branch names for auto enabeling scheme
     32    TList *fListOfBranches;     //! List of Branch names for auto enabeling scheme
    3433
    35     MFilter *fFilter;       // Filter for conditional task execution
    36     Byte_t   fSerialNumber; // Serial number having more than one detector of the same type
     34    MFilter *fFilter;           // Filter for conditional task execution
     35    Byte_t   fSerialNumber;     // Serial number having more than one detector of the same type
    3736
    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)
    3938
    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;   //!
    4343
    4444    virtual Int_t PreProcess(MParList *pList);
  • trunk/MagicSoft/Mars/mbase/MTaskEnv.cc

    r6278 r7601  
    143143
    144144    *fLog << fTask->ClassName() << " <MTaskEnv>... " << flush;
     145
     146    fTask->SetAccelerator(GetAccelerator());
    145147    return fTask->CallPreProcess(list);
    146148}
  • trunk/MagicSoft/Mars/mfbase/MF.cc

    r7200 r7601  
    364364    }
    365365
     366    fF->SetAccelerator(GetAccelerator());
     367
    366368    if (!fF->CallPreProcess(plist))
    367369    {
  • trunk/MagicSoft/Mars/mfbase/MFilterList.cc

    r6240 r7601  
    262262}
    263263
     264void MFilterList::SetAccelerator(Byte_t acc)
     265{
     266    fFilters.ForEach(MTask, SetAccelerator)(acc);
     267    MFilter::SetAccelerator(acc);
     268}
     269
    264270// --------------------------------------------------------------------------
    265271//
     
    276282    //
    277283    while ((filter=(MFilter*)Next()))
     284    {
     285        filter->SetAccelerator(GetAccelerator());
    278286        if (!filter->CallPreProcess(pList))
    279287        {
     
    282290            return kFALSE;
    283291        }
     292    }
    284293
    285294    return kTRUE;
  • trunk/MagicSoft/Mars/mfbase/MFilterList.h

    r6240 r7601  
    5959    Int_t PostProcess();
    6060
     61    void SetAccelerator(Byte_t acc=kAccStandard);
     62
    6163    void SetVariables(const TArrayD &arr);
    6264
  • trunk/MagicSoft/Mars/mjobs/MJCut.cc

    r7594 r7601  
    487487    // by setting it here it is distributed to all consecutive tasks
    488488    tlist.SetAccelerator(MTask::kAccDontReset|MTask::kAccDontTime);
    489     read.SetAccelerator();//MTask::kAccDontReset|MTask::kAccDontCount);
    490489
    491490    // Create and setup the eventloop
Note: See TracChangeset for help on using the changeset viewer.