Skip to content

Commit 45d1783

Browse files
committed
[Python][UHI] Refactor the UHI module
1 parent 9e0dad8 commit 45d1783

File tree

14 files changed

+669
-604
lines changed

14 files changed

+669
-604
lines changed

bindings/pyroot/pythonizations/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,10 @@ set(py_sources
127127
ROOT/_pythonization/_ttree.py
128128
ROOT/_pythonization/_tvector3.py
129129
ROOT/_pythonization/_tvectort.py
130-
ROOT/_pythonization/_uhi.py
130+
ROOT/_pythonization/_uhi/main.py
131+
ROOT/_pythonization/_uhi/tags.py
132+
ROOT/_pythonization/_uhi/indexing.py
133+
ROOT/_pythonization/_uhi/plotting.py
131134
${PYROOT_EXTRA_PYTHON_SOURCES}
132135
)
133136

bindings/pyroot/pythonizations/python/ROOT/_facade.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ def uhi(self):
479479
uhi_module.__file__ = "<module ROOT>"
480480
uhi_module.__package__ = self
481481
try:
482-
from ._pythonization._uhi import _add_module_level_uhi_helpers
482+
from ._pythonization._uhi.main import _add_module_level_uhi_helpers
483483

484484
_add_module_level_uhi_helpers(uhi_module)
485485
except ImportError:

bindings/pyroot/pythonizations/python/ROOT/_pythonization/_th1.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ def _FillWithArrayTH1(self, *args):
241241
for klass in _th1_derived_classes_to_pythonize:
242242
pythonization(klass)(inject_constructor_releasing_ownership)
243243

244-
from ROOT._pythonization._uhi import _add_plotting_features
244+
from ROOT._pythonization._uhi.main import _add_plotting_features
245245

246246
# Add UHI plotting features
247247
pythonization(klass)(_add_plotting_features)
@@ -257,7 +257,7 @@ def _enable_numpy_fill(klass):
257257
def pythonize_th1(klass):
258258
# Parameters:
259259
# klass: class to be pythonized
260-
from ROOT._pythonization._uhi import _add_indexing_features
260+
from ROOT._pythonization._uhi.main import _add_indexing_features
261261

262262
# Support hist *= scalar
263263
klass.__imul__ = _imul

bindings/pyroot/pythonizations/python/ROOT/_pythonization/_th2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def _FillWithArrayTH2(self, *args):
7878
for klass in _th2_derived_classes_to_pythonize:
7979
pythonization(klass)(inject_constructor_releasing_ownership)
8080

81-
from ROOT._pythonization._uhi import _add_plotting_features
81+
from ROOT._pythonization._uhi.main import _add_plotting_features
8282

8383
# Add UHI plotting features
8484
pythonization(klass)(_add_plotting_features)

bindings/pyroot/pythonizations/python/ROOT/_pythonization/_th3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
for klass in _th3_derived_classes_to_pythonize:
2828
pythonization(klass)(inject_constructor_releasing_ownership)
2929

30-
from ROOT._pythonization._uhi import _add_plotting_features
30+
from ROOT._pythonization._uhi.main import _add_plotting_features
3131

3232
# Add UHI plotting features
3333
pythonization(klass)(_add_plotting_features)

0 commit comments

Comments
 (0)