Skip to content

Commit 9bce7ea

Browse files
committed
Fix THStack::SavePrimitive
While stack name used for saved variable name, always provide class name. Like for histograms and many other objects
1 parent f01dd44 commit 9bce7ea

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

hist/hist/src/THStack.cxx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1034,8 +1034,11 @@ void THStack::RecursiveRemove(TObject *obj)
10341034
void THStack::SavePrimitive(std::ostream &out, Option_t *option)
10351035
{
10361036
TString name = gInterpreter->MapCppName(GetName());
1037+
if (name.IsNull())
1038+
name = "hstack";
1039+
1040+
out << " " << ClassName() << " *" << name << " = new " << ClassName() << "();\n";
10371041

1038-
SavePrimitiveConstructor(out, Class(), name);
10391042
SavePrimitiveNameTitle(out, name);
10401043

10411044
if (fMinimum != -1111)

0 commit comments

Comments
 (0)