Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions tree/tree/inc/TBranchCacheInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,20 +138,26 @@ class TBranchCacheInfo {
}

/// Print the info we have for the baskets.
void Print(const char *owner, Long64_t *entries) const
void Print(const char *owner, Long64_t *entries, Int_t nBaskets, Long64_t nEntries) const
{
if (!owner || !entries)
return;
auto len = fInfo.GetNbits() / kSize + 1;
if (fBasketPedestal >= 0)
if ( (fBasketPedestal + len) > (UInt_t)nBaskets)
len = nBaskets - fBasketPedestal;
if (fBasketPedestal >= 0 && len) {
for (UInt_t b = 0; b < len; ++b) {
Printf("Branch %s : basket %d loaded=%d used=%d start entry=%lld", owner, b + fBasketPedestal,
(bool)fInfo[kSize * b + kLoaded], (bool)fInfo[kSize * b + kUsed], entries[fBasketPedestal + b]);
}
Printf("Branch %s : entry range: [ %lld, %lld [", owner,
entries[fBasketPedestal],
(fBasketPedestal + len) >= (UInt_t)nBaskets ? nEntries : entries[fBasketPedestal + len]);
}
}
};

} // Internal
} // ROOT

#endif // ROOT_TBranchCacheInfo
#endif // ROOT_TBranchCacheInfo
2 changes: 1 addition & 1 deletion tree/tree/src/TBranch.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2363,7 +2363,7 @@ void TBranch::Print(Option_t *option) const

void TBranch::PrintCacheInfo() const
{
fCacheInfo.Print(GetName(), fBasketEntry);
fCacheInfo.Print(GetName(), fBasketEntry, fMaxBaskets, fEntries);
}

////////////////////////////////////////////////////////////////////////////////
Expand Down
2 changes: 2 additions & 0 deletions tree/tree/src/TTreeCache.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1266,6 +1266,8 @@ Bool_t TTreeCache::FillBuffer()
if (showMore || gDebug > 6)
Info("FillBuffer", "Looking at cluster spanning from %lld to %lld", fEntryCurrent, fEntryNext);

if (0 <= fNextClusterStart && fEntryCurrent < fNextClusterStart && !(fEntryCurrent < fNextClusterStart))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fEntryCurrent < fNextClusterStart && !(fEntryCurrent < fNextClusterStart) doesn't seem to make sense.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. This was intended to detect when the user is moving backward but a "typo/thinko" mess it up :( rendering the whole PR moot ... i.e. Test need to go in at the same time...

fEntryCurrent = fNextClusterStart;
if (fEntryCurrent < fEntryMin) fEntryCurrent = fEntryMin;
if (fEntryMax <= 0) fEntryMax = tree->GetEntries();
if (fEntryNext > fEntryMax) fEntryNext = fEntryMax;
Expand Down
Loading