Commit af08b76
committed
[RF][HF] Persist ShapeFactor const-ness to XML
Sample::PrintXML now writes the "Const" attribute for ShapeFactors, so a
ShapeFactor that was marked constant via SetConstant() keeps that state
when a Measurement is written to XML and read back.
The read side and schema were already in place:
**ConfigParser::MakeShapeFactor** parses the "Const" attribute, and the
ShapeFactor element declares it in HistFactorySchema.dtd. Only the
writer was missing it, so the const-ness was silently lost on a PrintXML
round trip. The attribute is always emitted as "True"/"False", matching
how other booleans (NormalizeByTheory, StatError's Activate) are
written.
Unlike NormFactor, whose const-ness is handled at the Measurement level
via `<ParamSetting Const="True">`, ShapeFactor carries its own per-bin
constant flag (wired into the gamma parameters in
HistoToWorkspaceFactoryFast), which is why it needs to be persisted on
the element itself.
🤖 Done by AI.1 parent 0765a5d commit af08b76
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1769 | 1769 | | |
1770 | 1770 | | |
1771 | 1771 | | |
1772 | | - | |
| 1772 | + | |
| 1773 | + | |
1773 | 1774 | | |
1774 | 1775 | | |
1775 | 1776 | | |
| |||
0 commit comments