Skip to content

Commit 60745d7

Browse files
authored
CTF: fill an existing branch from the object passed now, not the first one (#16172)
1 parent 3225ff9 commit 60745d7

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • DataFormats/Detectors/Common/include/DetectorsCommonDataFormats

‎DataFormats/Detectors/Common/include/DetectorsCommonDataFormats/EncodedBlocks.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,8 @@ inline size_t EncodedBlocks<H, N, W>::fillTreeBranch(TTree& tree, const std::str
725725
if (!br) {
726726
br = tree.Branch(brname.c_str(), &dt, 512, splitLevel);
727727
br->SetCompressionLevel(compLevel);
728+
} else {
729+
br->SetObject(&dt); // dt may be a caller's local: never fill from where it was at the first call
728730
}
729731
return br->Fill();
730732
}

0 commit comments

Comments
 (0)