From f01dd44411250fa5fd90d4012e1805bafbf4559d Mon Sep 17 00:00:00 2001 From: Sergey Linev Date: Thu, 30 Oct 2025 10:11:21 +0100 Subject: [PATCH 1/2] Fix TArrow::SavePrimitive GetOption has to be used in TArrow constructor --- graf2d/graf/src/TArrow.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graf2d/graf/src/TArrow.cxx b/graf2d/graf/src/TArrow.cxx index 5299f3007c0ac..5dc48cc07fc2b 100644 --- a/graf2d/graf/src/TArrow.cxx +++ b/graf2d/graf/src/TArrow.cxx @@ -364,7 +364,7 @@ void TArrow::SavePrimitive(std::ostream &out, Option_t *option) { SavePrimitiveConstructor(out, Class(), "arrow", TString::Format("%g, %g, %g, %g, %g, \"%s\"", fX1, fY1, fX2, fY2, fArrowSize, - TString(GetDrawOption()).ReplaceSpecialCppChars().Data())); + TString(GetOption()).ReplaceSpecialCppChars().Data())); SaveFillAttributes(out, "arrow", 0, 1); SaveLineAttributes(out, "arrow", 1, 1, 1); From 9bce7ea270e2c4fe443a91bafda0728f476fafd3 Mon Sep 17 00:00:00 2001 From: Sergey Linev Date: Thu, 30 Oct 2025 10:24:56 +0100 Subject: [PATCH 2/2] Fix THStack::SavePrimitive While stack name used for saved variable name, always provide class name. Like for histograms and many other objects --- hist/hist/src/THStack.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hist/hist/src/THStack.cxx b/hist/hist/src/THStack.cxx index bb512a9e2ce68..f56e7eeaeb155 100644 --- a/hist/hist/src/THStack.cxx +++ b/hist/hist/src/THStack.cxx @@ -1034,8 +1034,11 @@ void THStack::RecursiveRemove(TObject *obj) void THStack::SavePrimitive(std::ostream &out, Option_t *option) { TString name = gInterpreter->MapCppName(GetName()); + if (name.IsNull()) + name = "hstack"; + + out << " " << ClassName() << " *" << name << " = new " << ClassName() << "();\n"; - SavePrimitiveConstructor(out, Class(), name); SavePrimitiveNameTitle(out, name); if (fMinimum != -1111)