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:
@@ -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/
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user