Skip to content

Validating Changes

jdkio edited this page Aug 8, 2024 · 2 revisions

At a bare minimum, make sure some test files process. First setup and compile your modified version. Then edit config/TMS_Default_Config.toml and set MaximumNEvents = 5000 or some other reasonable number. Then try running some test files

# Nersc files
ConvertToTMSTree.exe /pnfs/dune/persistent/users/abooth/Production/MiniProdN1p2-v1r1/run-spill-build/output/MiniProdN1p2_NDLAr_1E19_RHC.spill/EDEPSIM_SPILLS/00000/MiniProdN1p2_NDLAr_1E19_RHC.spill.00049.EDEPSIM_SPILLS.root
# events on TMS and LAr
ConvertToTMSTree.exe /pnfs/dune/persistent/users/kleykamp/nd_production/2024-04-18_rhc_test/edep/RHC/00m/00/antineutrino.0_1713482441.edep.root
# Lar-only but not from nersc
ConvertToTMSTree.exe /pnfs/dune/persistent/users/kleykamp/nd_production/2024-05-13_lar_only_rhc/edep/RHC/00m/00/antineutrino.0_1715654453.edep.root

All cases should complete within a reasonable time. The output can then be inspected with scripts. We're still working on them but currently using scripts in scripts/Validation

./Reco_Tracks ../../antineutrino.0_1713482441.edep_TMS_RecoCandidates_Hough_Cluster1.root && python simply_draw_everything.py /exp/dune/data/users/kleykamp/dune-tms/Validation/Reco_Tracks/antineutrino.0_1713482441.edep_TMS_RecoCandidates_Hough_Cluster1.root

Debugging

There are many ways to debug code. If all else fails, the easiest remaining technique is gdb. Do gdb ConvertToTMSTree.exe, then r <file> when it's started.

Read some gdb guides online for help. You can set breakpoints, read memory, etc. If the code is an in infinite loop, ctrl-c once you think you're inside it. Then do bt and you'll see the backtrace where the code stopped exactly. You can continue with c, and repeat as needed

Clone this wiki locally