From e002b390cafd09cb6f741507eae29c8dda056173 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Mon, 7 Oct 2024 18:54:05 -0400 Subject: [PATCH] add bench:lfhcal_campaigns --- benchmarks/lfhcal/Snakefile | 4 ++-- benchmarks/lfhcal/config.yml | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/benchmarks/lfhcal/Snakefile b/benchmarks/lfhcal/Snakefile index 3526ec39..b0177433 100644 --- a/benchmarks/lfhcal/Snakefile +++ b/benchmarks/lfhcal/Snakefile @@ -109,13 +109,13 @@ LFHCAL_ETA_BINS = [1.2,1.5,2,2.5,3,3.5] rule lfhcal: input: - expand( + lambda wildcards: expand( [ "{{CAMPAIGN}}/Final_Results/{PARTICLE}/mom/lfhcal_mom_resol_{PARTICLE}_{ETA_BIN}.png", "{{CAMPAIGN}}/Final_Results/{PARTICLE}/mom/lfhcal_mom_resol_{PARTICLE}_{ETA_BIN}.root", ], ETA_BIN=[f"{eta_min:.1f}_eta_{eta_max:.1f}" for eta_min, eta_max in zip(LFHCAL_ETA_BINS[:-1], LFHCAL_ETA_BINS[1:])], - PARTICLE=["neutron", "pi-"], + PARTICLE=["neutron", "pi-"] if wildcards.CAMPAIGN == "local" else ["pi-"], ) output: directory("results/lfhcal/{CAMPAIGN}/") diff --git a/benchmarks/lfhcal/config.yml b/benchmarks/lfhcal/config.yml index 3bff69f4..f7b9ad3a 100644 --- a/benchmarks/lfhcal/config.yml +++ b/benchmarks/lfhcal/config.yml @@ -28,3 +28,21 @@ collect_results:lfhcal: - mv results{,_save}/ # move results directory out of the way to preserve it - snakemake --cores 1 --delete-all-output lfhcal_local - mv results{_save,}/ + +bench:lfhcal_campaigns: + extends: .det_benchmark + stage: benchmarks + #when: manual + script: + - snakemake --cores 1 lfhcal_campaigns + +collect_results:lfhcal_campaigns: + extends: .det_benchmark + stage: collect + needs: + - "bench:lfhcal_campaigns" + script: + - ls -lrht + - mv results{,_save}/ # move results directory out of the way to preserve it + - snakemake --cores 1 --delete-all-output lfhcal_campaigns + - mv results{_save,}/