From 42a3539ef0e4a8532494f1628ccac354e36e6c36 Mon Sep 17 00:00:00 2001
From: Philippe Canal <pcanal@fnal.gov>
Date: Thu, 2 Dec 2010 22:56:23 +0000
Subject: [PATCH] Avoid creating phantom branches for the artificial and the
 repeat elements (i.e. avoid creating a branch for a transient member with a
 schema evolution rule)

git-svn-id: http://root.cern.ch/svn/root/trunk@37210 27541ba8-7e3a-0410-8455-c3a389f83636
---
 tree/tree/src/TBranchElement.cxx | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tree/tree/src/TBranchElement.cxx b/tree/tree/src/TBranchElement.cxx
index 2759af06312..08bdfd8429b 100644
--- a/tree/tree/src/TBranchElement.cxx
+++ b/tree/tree/src/TBranchElement.cxx
@@ -4726,6 +4726,12 @@ Int_t TBranchElement::Unroll(const char* name, TClass* clParent, TClass* cl, cha
    for (Int_t elemID = 0; elemID < ndata; ++elemID) {
       // -- Loop over all the streamer elements and create sub-branches as needed.
       TStreamerElement* elem = (TStreamerElement*) elems[elemID];
+      if (elem->IsA() == TStreamerArtificial::Class()) {
+         continue;
+      }
+      if (elem->TestBit(TStreamerElement::kRepeat)) {
+         continue;
+      }
       Int_t offset = elem->GetOffset();
       // FIXME: An STL container as a base class gets TStreamerSTL as its class, so this test is not enough.
       // See InitializeOffsets() for the proper test.
-- 
GitLab