print commit hash on import; fix event_id offset in multi-core steps

G4Calo.py prints the commit at import time, resolved via a
minicalo_version.py file (baked in by Docker) or git rev-parse
from the file's directory as fallback.

event_id in the Steps ntuple restarts from 0 in each subprocess;
_assemble_results_to_mini_df now accepts per-file event_id_offsets
so IDs are globally unique after merging. run_batch passes cumulative
nevents as offsets when loading the Steps tree.

Dockerfiles write minicalo_version.py before copying Python files.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-08 16:35:31 +02:00
co-authored by Claude Sonnet 4.6
parent f5c832fd44
commit 5fc50bcefc
4 changed files with 42 additions and 8 deletions
+2 -1
View File
@@ -99,7 +99,8 @@ ADD minicalosim /root/minicalosim
RUN cd /root/minicalosim && git checkout $COMMIT && \
git submodule update --init lib/pybind11 && \
mkdir -p build && cd build && rm -rf * && cmake ../ && make -j$(nproc) &&\
cp minicalo* ../bind/G4Calo.py /usr/local/lib/python3.8/dist-packages/
echo "commit = '${COMMIT}'" > ../bind/minicalo_version.py && \
cp minicalo* ../bind/G4Calo.py ../bind/minicalo_version.py /usr/local/lib/python3.8/dist-packages/