Sphere: Science Physics High Energy Research Environment

Hello Everyone,

After spending time studying and testing ROOT, along with this forum and several other ROOT‑related resources, I came up with the idea of creating Sphere as a meaningful way to fully explore its potential: a hybrid sandbox, multi‑language (C++, Python, Julia) and multi‑platform (Windows, Linux, macOS, WSL), essentially a Matlab‑like environment dedicated to HEP. The first step is integrating ROOT, followed later by Geant4, MG5, and Herwig.

Thank you in advance for your understanding, the project is only a few months old :sweat_smile:

– C++ layer

root‑bridge (technical details available on GitHub): hxxps://github[dot]com/Ehepphyz/Sphere

root‑bridge also supports ROOT installations managed through virtual environments, whether based on venv or conda.

Project directory tree (I placed the initial modules in commands/ to clearly expose the overall architecture and how the root‑bridge components are used):

rootbackend/
│ CMakeLists.txt

├── commands
│ │ cmd_file.cpp
│ │ cmd_file.h
│ │ cmd_system.cpp
│ │ cmd_system.h
│ │ cmd_ttree.cpp
│ │ cmd_ttree.h
│ │
│ └── TTreehandlers
│ │ cmd_ttree_filter.cpp
│ │ cmd_ttree_range.cpp
│ │ cmd_ttree_schema.cpp
│ │ ttree_common.h

├── inc
│ │ AsyncFileLoader_io_uring.h
│ │ command_registry.h
│ │ common_config.h
│ │ DecompressorPool.h
│ │ engine.h
│ │ lockfree_ring.h
│ │ logger.h
│ │ packets.h
│ │ platform.h
│ │ ringbuffer.h
│ │ RootBatchLoader.h
│ │ RootBatchLoaderMultiFile.h
│ │ root_runtime.h
│ │ shm_layout.h
│ │ span_record.h
│ │ span_ring.h
│ │ span_scope.h
│ │ utils.h

├── includes
├── user_scripts

└── src
│ engine.cpp
│ logger.cpp
│ main.cpp
│ platform.cpp
│ ringbuffer.cpp
│ root_runtime.cpp
│ shm_layout.cpp
│ span_ring.cpp
│ utils.cpp

The CMakeLists.txt file is provided as an additional option for manual compilation, in case you need it.

The includes/ directory contains the components required for root‑bridge modularity, allowing users to build their own pipeline. Conversely, user_scripts/ is intended for macros.
Additionally, root‑bridge can run in standalone mode, which simplifies debugging and testing.

Data‑transfer performance depends on the size of the .root file: end‑to‑end benchmarks show latencies ranging from <4 ns up to ~14 ns. The foundation for GPU‑based processing is already in place, which could become the focus of the next version if this one does not fully meet your expectations (just a few C++ adjustments).


- Java layer

Sphere’s Java layer provides a traditional file explorer (copy, move, edit via right‑click; direct manipulation via left‑click, similar to Linux/macOS).
It also includes a JSON explorer dedicated to workspace management: each file operation (copy/move) updates both the filesystem and the corresponding JSON entry.

Sphere’s settings.conf works similarly to a .bashrc: it loads the OS configuration and merges it with your personal settings defined in settings.conf. I also implemented the sourcing command to make reloading the configuration easier and to ensure that ROOT becomes detectable by other applications such as MG5, and so on.

The CLI features four command levels. Commands prefixed with : execute the associated actions, such as :echo $PATH, :pushd, :popd, :cpp, :root, etc. The :: prefix is reserved for snippets/macros execution (C++, Python, julia). All commands support multiple flags and options. For example:

:cpp {flag1} {flag2} {option1} {option2}

If you insert a snippet/macro using the syntax :

[@ my_macro.ext {flag1} {flag2} {option1} {option2}] \$\$ \$\$ \$\$ $$

you may also pass flags and options, but only for that snippets/macro inside the brackets.

I implemented a small set of essential Linux commands that I consider highly useful and that you can use cross‑platform.

Sphere includes notebook editing and execution (Notebook/JupyterLab), a Python switcher, a terminal, a simple text editor (more coming), and a telemetry module for Clang/C++. Several additional features are currently under development.


The code is entirely free to use, and you are welcome to modify it in any way you see fit.

I’ve done my best to be worthy of this remarkable application and of the tremendous work you’ve invested in making ROOT what it is. I hope my contribution reflects that.

Best regards,

Sacha

I implemented a small set of essential Linux commands that I consider highly useful and that you can use cross‑platform. Sphere includes notebook editing and execution (Notebook/JupyterLab), a terminal, a simple text editor (more coming), and a telemetry module for Clang/C++. Several additional features are currently under development. --- The code is entirely free to use, and you are welcome to modify it in any way you see fit. I’ve done my best to be worthy of this remarkable application and of the tremendous work you’ve invested in making ROOT what it is. I hope my contribution reflects that. Best regards, Sacha
1 Like