# Error in StandardHypoTestInvDemo.C after ROOT 6.32

**URL:** <https://root-forum.cern.ch/t/error-in-standardhypotestinvdemo-c-after-root-6-32/64722>\
**Category:** Roofit and RooStats\
**Tags:** roofit, python, root\
**Created:** [February 27, 2026, 4:56pm UTC](https://root-forum.cern.ch/t/error-in-standardhypotestinvdemo-c-after-root-6-32/64722 "2026-02-27T16:56:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fsili](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/f/6de8d8/32.png) [@fsili](https://root-forum.cern.ch/u/fsili)\
**Post date:** [February 27, 2026, 4:56pm UTC](https://root-forum.cern.ch/t/error-in-standardhypotestinvdemo-c-after-root-6-32/64722/1 "2026-02-27T16:56:32Z")

</div>

Hello experts,

I want to use the macro `StandardHypoTestInvDemo.C` to compute limits with toys.

I am currently using ROOT version 6.36 but I found that the macro does not work anymore as I am getting the following error:

```auto
cppyy.gbl.std.runtime_error: void StandardHypoTestInvDemo(const char* infile = 0, const char* wsName = "combined", const char* modelSBName = "ModelConfig", const char* modelBName = "", const char* dataName = "obsData", int calculatorType = 0, int testStatType = 0, bool useCLs = true, int npoints = 6, double poimin = 0, double poimax = 5, int ntoys = 1000, bool useNumberCounting = false, const char* nuisPriorName = nullptr) =>
    runtime_error: Error in RooAbsReal::setData(): only resetting with same-structured data is supported.

```

This, however, doesn’t happen for ROOT version 6.32, as I managed to get the macro to run using the same inputs. The macro also doesn’t work in ROOT v6.38. I did change the macro accordingly between versions using:

- [The 6.36 version macro](https://root.cern/doc/v636/StandardHypoTestInvDemo_8C_source.html) (this one needed some tweaking as there are errors, for example in line 257)
- [The 6.32 version macro](https://root.cern/doc/v632/StandardHypoTestInvDemo_8C_source.html)

The dataset included in the workspace I am using is a RooDataHist.

Do you know how this can be fixed? I wouldn’t like to go back ROOT versions as I would need to recompute all other results using that version, plus need to re-work lots of parts of the code.

Thank you very much!

Best,  
Francisco

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [February 27, 2026, 5:40pm UTC](https://root-forum.cern.ch/t/error-in-standardhypotestinvdemo-c-after-root-6-32/64722/2 "2026-02-27T17:40:47Z")

</div>

Make sure you always use the ROOT version-specific macros:

`find $(root-config --tutdir) -name "StandardHypoTestInvDemo.*"`

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [March 13, 2026, 5:41pm UTC](https://root-forum.cern.ch/t/error-in-standardhypotestinvdemo-c-after-root-6-32/64722/3 "2026-03-13T17:41:23Z")

</div>

Closed on March 13, 2026, 5:41pm UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
