Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions python/aghast/connect/root.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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):
Expand Down
5 changes: 5 additions & 0 deletions python/tests/test_root.py
Original file line number Diff line number Diff line change
Expand Up @@ -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