Skip to content

[RF][HS3] Round-trip import of root workspace has missing dependency error #22497

Description

@kratsg

Check duplicate issues.

  • Checked for duplicates

Description

Running a round-trip should work

root [0]
Processing import.C...
[#1] INFO:ObjectHandling -- RooWorkspace::import(combWS) importing RooRealVar::ATLAS_EG_RESOLUTION_ALL_run2
[#1] INFO:ObjectHandling -- RooWorkspace::import(combWS) importing RooRealVar::ATLAS_EG_RESOLUTION_ALL_run3
...
...
[#1] INFO:Eval -- RooRealVar::setRange(atlas_invMass_Run3LM_2) new range named 'cache' created with bounds [105,160]
[#1] INFO:Eval -- RooRealVar::setRange(atlas_invMass_Run3LM_3) new range named 'cache' created with bounds [105,160]
[#1] INFO:Eval -- RooRealVar::setRange(atlas_invMass_Run3LM_4) new range named 'cache' created with bounds [105,160]
libc++abi: terminating due to uncaught exception of type RooJSONFactoryWSTool::DependencyMissingError: object 'expected__shape_ggFHH_kl1p0_mc20ade_scale_shape_ggFHH_kl1p0_mc20ade_scale_ATLAS_EG_SCALE_ALL_run2__prod_PI_Run2HM_1' is missing dependency 'shape_ggFHH_kl1p0_mc20ade_scale_ATLAS_EG_SCALE_ALL_run2__prod_Run2HM_1' of type 'RooRealVar'

Reproducer

export.C

{
  auto f = TFile::Open("WS-bbyy-non-resonant-non-param-isofix.root");
  auto* w = (RooWorkspace*) f->Get("combWS");
  auto mytool = RooJSONFactoryWSTool(*w);
  mytool.exportJSON("WS-bbyy-non-resonant-non-param-isofix_unbinnedFix.json");
}

import.C

{
  auto* w = new RooWorkspace("combWS");
  auto mytool = RooJSONFactoryWSTool(*w);
  mytool.importJSON("WS-bbyy-non-resonant-non-param-isofix_unbinnedFix.json");
}
  1. root export.C
  2. root import.C

ROOT version

   ------------------------------------------------------------------
  | Welcome to ROOT 6.38.04                        https://root.cern |
  | (c) 1995-2025, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for macosxarm64 on Mar 12 2026, 21:20:18                   |
  | From tags/6-38-04@6-38-04                                        |
  | With  std202302                                                  |
  | Try '.help'/'.?', '.demo', '.license', '.credits', '.quit'/'.q'  |
   ------------------------------------------------------------------

Installation method

all (conda-forge, pre-built via LCG)

Operating system

MacOS, Linux Alma9

Additional context

Reproducible on 6.38.00 as well.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions