Skip to content

[tracking] Load rootext C++ code via ROOT.gInterpreter #59

@heijligen

Description

@heijligen

This issue document the the changes and progress required to load all needed C++ code without prior compelation.

Why?

These changes should make it easier to setup and get started with HDTV. It removes the need to have a C/C++ compiler and CMake on the host.
ROOT has been further developed and so can HDTV use this development to make this code base better maintainable and make it easier for future developers to work with it.

Changes

  • Loading the rootext C++ files via ROOT.gInterpreter.ProcessLine('.L <file>')
    ROOT ships with a Clang based C++ interpreter/JIT. It replaces the old CINT interpreter and is exactly for extending ROOT with C++ code and dealing with the version mismatch and recompiling challenges HDTV also solves. But it is built-in and does not need an extra compiler and cmake tools during runtime.

  • Unify the C++ sources and headers into a single header only library
    A single file is much easier to load via ROOT.gInterpreter.ProcessLine('.L Calibration.hpp').

  • Build and ship libmfile as part of the python wheel
    libmfile does not depend on ROOT or an other 3rd party library that make it version dependent. It can be prebuild / shipped in the wheel and
    then be loaded via ROOT.gSystem.Load('libmfile.so') / ROOT.gInterpreter.AddIncludePath(...) before processing MatOp, MFileHist and VMatrix.
    Integrate libmfile directly into HDTV #69 Is a solution going further with replacing the C and C++ code

Q&A

  • Can the ROOT PyPI package be used after these changes?
    Yes, when Reimplement the GUI in pure Python. #70 is done

  • How does those changes effect testing?
    The compelation / interpretation of the C++ code is done during execution of the package. Since the Compiler/Interpreter is part of ROOT, the C++ code is run on multiple different ROOT/Compiler/Interpreter versions with the existing test matrix.

  • Does those changes make HDTV run native on MacOS or Windows?
    Beside Reimplement the GUI in pure Python. #70 a few more changes are required for cross platform use.

  • What happens with --rebuild-usr & --rebuild-sys?
    They are no longer needed and can be deprecated. I would keep them around for a while with a notice and no effect before removing them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions