Skip to content

Commit

Permalink
root: cherry-pick b54356e5cd8e17b8848ae6ce9f7b27145d5059d2
Browse files Browse the repository at this point in the history
The follwoning adds b54356e5cd8e17b8848ae6ce9f7b27145d5059d2 commit
to fix issues noticed in CMSSW_6_2_0_pre7 w/ ROOT 5.34.07.

Signed-off-by: David Abdurachmanov <[email protected]>
  • Loading branch information
David Abdurachmanov committed Jun 11, 2013
1 parent ec6561f commit d0c9288
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
43 changes: 43 additions & 0 deletions root-5.34.07-fix-fatal-removal-in-branch-names.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
From b54356e5cd8e17b8848ae6ce9f7b27145d5059d2 Mon Sep 17 00:00:00 2001
From: Philippe Canal <[email protected]>
Date: Thu, 6 Jun 2013 15:17:32 -0500
Subject: [PATCH] Fix spurrious (fatal) removal of duplicate part of branch
names.

Since v5-34-06 (specifically commit b454e81), a TTree fails to save
the content of a branch that is part of a split STL collection and
whose name (of the data member) match some other component of the
branch name (and the two must be separted my at least one level).

For example out.OBJ.vec.OBJect
or TH1DMEtoEDM_MEtoEDMConverter_MEtoEDMConverterRun_TEST.obj.MEtoEdmObject.object.

When reading the file back in v5-34-06, 07 or 08, this will result
in the data not being written and the missing data not being noticed in any way
by the I/O .. but of course, it is not being read.

When reading the file back with v5-34-05 or below, this can result
in error messages like:

Error in <TBufferFile::ReadVersion>: Could not find the StreamerInfo with a checksum of 0x20000 for the class "TH1F" in output.root.
---
tree/tree/src/TBranchElement.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tree/tree/src/TBranchElement.cxx b/tree/tree/src/TBranchElement.cxx
index 286238d..0277a30 100644
--- a/tree/tree/src/TBranchElement.cxx
+++ b/tree/tree/src/TBranchElement.cxx
@@ -3008,7 +3008,8 @@ void TBranchElement::InitializeOffsets()
//-----------------------------------------------------------------
if( stlParentName.Length() )
{
- if( !strncmp( stlParentName.Data(), dataName.Data(), stlParentName.Length()-1 ))
+ if( !strncmp( stlParentName.Data(), dataName.Data(), stlParentName.Length()-1 )
+ && dataName[ stlParentName.Length() ] == '.' )
dataName.Remove( 0, stlParentName.Length()+1 );
}

--
1.8.2

2 changes: 2 additions & 0 deletions root.spec
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Patch2: root-5.34.00-linker-gnu-hash-style
Patch3: root-5.32.00-detect-arch
Patch4: root-5.30.02-fix-gcc46
Patch5: root-5.30.02-fix-isnan-again
Patch6: root-5.34.07-fix-fatal-removal-in-branch-names

%define cpu %(echo %cmsplatf | cut -d_ -f2)

Expand Down Expand Up @@ -43,6 +44,7 @@ Requires: freetype
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1

# The following patch can only be applied on SLC5 or later (extra linker
# options only available with the SLC5 binutils)
Expand Down

0 comments on commit d0c9288

Please sign in to comment.