-
- Downloads
Fix fOffset calculation when encountering cached elements
Update the StreamerElement search in TBranchElement::InitializeOffsets to always try to find a StreamerElement that points to one of the member of the actual class. This allows for properly finding the offset of the local object within the outer object. The previous version was somtimes looking at 'cached' StreamerElement; however their local offset are (often) different that the non-cached version and the main offset is very often different. The previous code was then applying this offset to both the actions for the cached StreamerElement and for the regular StreamerElement. For the cached element the two actions compensated each other. For the regular element if the local object had an object within the main object, this was leading to the 'reading' of the local object overwriting content in the main object. Now the offset is calculated for the local object in regard to the outer object using one the StreamerElement that points to one of the member of the actual class *and* AddToOffset is not applied to the cached object (since they are never part of an outer object the offset is always zero). This fixes ROOT-5437 (cherry picked from commit 4fe9faed)
Loading
Please register or sign in to comment