Fix the NTupleWriter algorithm to handle `DataObject*` and `AnyDataWrapperBase*` Correctly in `BranchWrapper`
Compare changes
Files
4@@ -11,6 +11,7 @@
@@ -62,4 +63,14 @@ namespace Gaudi::TestSuite::NTuple {
Refactored BranchWrapper::setBranchData
to properly handle cases where casting to AnyDataWrapperBase*
fails.
Previously, the code raised an exception when the cast failed, which was incorrect, as in some (if not most) cases we actually want to store the DataObject*
directly.
Now the code handles both cases: using AnyDataWrapperBase*
when available, and defaulting to DataObject*
when the cast fails.