Changeset 4183 for trunk/MagicSoft


Ignore:
Timestamp:
05/25/04 15:42:38 (21 years ago)
Author:
reyes
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mfileio/MReadReports.cc

    r3788 r4183  
    342342        TChain *chain = (TChain*)fChains->At(nmin);
    343343
     344        MTask *task = (MTask*)fTrees->GetList()->At(nmin);
     345
    344346        //Int_t before = chain->GetTreeNumber();
    345347        if (chain->GetEntry(++fPosEntry[nmin])>0)
    346348        {
    347             MTask *task = (MTask*)fTrees->GetList()->At(nmin);
    348 
    349             if (task->CallProcess())
     349            const Int_t rc = task->CallProcess();
     350            if (rc)
    350351            {
    351352                fList->SetStreamId(task->GetName());
    352                 return kTRUE;
     353                return rc;
    353354            }
    354355        }
     
    356357        *fLog << dbg << "Removing chain " << chain->GetName() << " from list." << endl;
    357358
    358         delete *GetTime(chain);
    359         delete  GetTime(chain);
    360         delete fChains->Remove(chain);
    361     }
    362 
    363     return kFALSE;
     359        delete *GetTime(chain);        // Delete MTime*
     360        delete  GetTime(chain);        // Delete MTime-instance
     361        delete fChains->Remove(chain); // Remove chain from TList
     362
     363        // FIXME: Maybe MTaskList should have a member function to
     364        //        reorder the tasks?
     365
     366        // Move this task to the end of the list so that nmin still
     367        // corresponds to the correct task in the list.
     368        const_cast<TList*>(fTrees->GetList())->Remove(task);
     369        const_cast<TList*>(fTrees->GetList())->AddLast(task);
     370    }
     371
     372    return kFALSE;
    364373}
    365374
Note: See TracChangeset for help on using the changeset viewer.