Skip to content

Commit

Permalink
In TBranchElement::Print use the correct StreamerInfo in case of sche…
Browse files Browse the repository at this point in the history
…ma evolution
  • Loading branch information
pcanal committed Nov 6, 2018
1 parent 77ff023 commit 82fad76
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions tree/tree/src/TBranchElement.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3671,9 +3671,17 @@ static void PrintElements(const TStreamerInfo *info, const TStreamerInfoActions:
{
for(auto &cursor : ids) {
auto id = cursor.fElemID;
if (id >= 0)
info->GetElement(id)->ls();
else if (cursor.fNestedIDs) {
if (id >= 0) {
auto el = info->GetElement(id);
if (el)
el->ls();
else {
Error("TBranchElement::Print", "Element for id #%d not found in StreamerInfo for %s",
id, info->GetName());
info->ls();
TClass::GetClass("PFTauWith")->GetStreamerInfos()->ls();
}
} else if (cursor.fNestedIDs) {
Printf(" Within subobject of type %s offset = %d", cursor.fNestedIDs->fInfo->GetName(), cursor.fNestedIDs->fOffset);
PrintElements(cursor.fNestedIDs->fInfo, cursor.fNestedIDs->fIDs);
}
Expand Down Expand Up @@ -3729,7 +3737,8 @@ void TBranchElement::Print(Option_t* option) const
} else if (!fNewIDs.empty() && GetInfoImp()) {
TStreamerInfo *localInfo = GetInfoImp();
if (fType == 3 || fType == 4) {
localInfo = (TStreamerInfo *)fClonesClass->GetStreamerInfo();
// Search for the correct version.
localInfo = FindOnfileInfo(fClonesClass, fBranches);
}
PrintElements(localInfo, fNewIDs);
Printf(" with read actions:");
Expand Down

0 comments on commit 82fad76

Please sign in to comment.