diff --git a/python/aghast/connect/root.py b/python/aghast/connect/root.py index cf08c87..e06bc38 100644 --- a/python/aghast/connect/root.py +++ b/python/aghast/connect/root.py @@ -272,6 +272,7 @@ def toroot(obj, name): return out elif len(axissummary) == 2: + # start here for Aghast -> ROOT conversion; probably after you've already made some ghastly histograms from ROOT raise NotImplementedError elif len(axissummary) == 3: @@ -363,6 +364,7 @@ def fromroot(obj, collection=False): return out elif isinstance(obj, ROOT.TH2): + # start here for ROOT -> Aghast; this should probably be the direction you do first, to have something to work with raise NotImplementedError elif isinstance(obj, ROOT.TH3): diff --git a/python/tests/test_root.py b/python/tests/test_root.py index 1a21c5b..f7103ac 100644 --- a/python/tests/test_root.py +++ b/python/tests/test_root.py @@ -110,3 +110,8 @@ def test_root_oned(cls): for x in data: before.Fill(x) after = connect_root.toroot(connect_root.fromroot(before), rootname()) check1d(before, after) + +@pytest.mark.parametrize("cls", [TH2D]) # [ROOT.TH2C, ROOT.TH2S, ROOT.TH2I, ROOT.TH2F, ROOT.TH2D]) +def test_root_twod(cls): + before = cls(rootname(), "title", 5, -2.0, 2.0, 6, -3.0, 3.0) + # test driven development: make examples here of what you want to convert and then fill in the code that does it