Changeset 10130


Ignore:
Timestamp:
Feb 4, 2011, 3:36:21 PM (9 years ago)
Author:
tbretz
Message:
Fixed a bug in MreadReports which caused the reading to get corrupted as soon as the first event tree was fully read.
File:
1 edited

Legend:

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

    r8780 r10130  
    438438        if (cnt<=0 || rc==kFALSE)
    439439        {
    440             *fLog << dbg << "Removing chain " << chain->GetName() << " from list" << flush;
     440            *fLog << inf << "Removing chain " << chain->GetName() << " from list" << flush;
     441
     442            // Find index of chain to be removed
     443            const Int_t idx = fChains->IndexOf(chain);
     444            *fLog << " (" << idx << ")" << flush;
    441445
    442446            delete *GetTime(chain);        // Delete MTime*
     
    444448            delete fChains->Remove(chain); // Remove chain from TList
    445449            *fLog << "." << flush;
     450
     451            // Change array accordingly
     452            if (fPosEntry.GetSize()>1)
     453            {
     454                for (int i=idx; i<fPosEntry.GetSize()-1; i++)
     455                    fPosEntry[i] = fPosEntry[i+1];
     456                fPosEntry[fPosEntry.GetSize()-1] = 0;
     457            }
    446458
    447459            // FIXME: Maybe MTaskList should have a member function to
Note: See TracChangeset for help on using the changeset viewer.