Skip to content

[RF] RooWorkspace::data returns null pointer if the workspace contains 52 or more datasets #20904

@Zehvogel

Description

@Zehvogel

Check duplicate issues.

  • Checked for duplicates

Description

as the title says...

reproducer below prints:
dataset retrieval failed with 52 datasets

Reproducer

import ROOT


max_n = 100

for n in range(1, max_n):
    w = ROOT.RooWorkspace("w", "workspace")
    obs = [ROOT.RooRealVar("O", "O", 0., -1., 1.)]
    w.Import(obs)
    for i in range(n):
        ds_name = f"dataset_{i}"
        ds = ROOT.RooDataSet(ds_name, ds_name, obs)
        w.Import(ds)
    test_ds = w.data("dataset_0")
    if not test_ds:
        print(f"dataset retrieval failed with {n} datasets")
        break

ROOT version

------------------------------------------------------------------
  | Welcome to ROOT 6.38.00                        https://root.cern |
  | (c) 1995-2025, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for linuxx8664gcc on Dec 21 2025, 15:58:20                 |
  | From tags/6-38-00@6-38-00                                        |
  | With g++ (Spack GCC) 14.2.0 std202002                            |
  | Try '.help'/'.?', '.demo', '.license', '.credits', '.quit'/'.q'  |
   ------------------------------------------------------------------

Installation method

source /cvmfs/sw-nightlies.hsf.org/key4hep/setup.sh -r 2026-01-15

Operating system

Alma9

Additional context

No response

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions