Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dataflow-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ paths:

tmp_plt: $_/generated/tmp/plt
tmp_log: $_/generated/tmp/log
tmp_benchmark: $_/generated/tmp/benchmark
tmp_filelists: $_/generated/tmp/filelists
tmp_par: $_/generated/tmp/par

Expand Down
1 change: 1 addition & 0 deletions tests/dummy_cycle/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ paths:

tmp_plt: $_/generated/tmp/plt
tmp_log: $_/generated/tmp/log
tmp_benchmark: $_/generated/tmp/benchmark
tmp_filelists: $_/generated/tmp/filelists
tmp_par: $_/generated/tmp/par

Expand Down
2 changes: 2 additions & 0 deletions workflow/rules/dsp.smk
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ rule build_dsp:
tier_file=patt.get_pattern_tier(config, "dsp", check_in_cycle=check_in_cycle),
log:
patt.get_pattern_log(config, "tier_dsp", time),
benchmark:
patt.get_pattern_benchmark(config, "tier_dsp", time)
group:
"tier-dsp"
threads: get_threads
Expand Down
11 changes: 11 additions & 0 deletions workflow/rules/dsp_pars_geds.smk
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ from legenddataflow.methods.patterns import (
get_pattern_tier,
get_pattern_log,
get_pattern_pars,
get_pattern_benchmark_channel,
)
from legenddataflow.methods.paths import (
filelist_path,
Expand All @@ -38,6 +39,8 @@ rule build_pars_dsp_pz_geds:
dsp_plots=temp(get_pattern_plts_tmp_channel(config, "dsp", "decay_constant")),
log:
get_pattern_log_channel(config, "par_dsp_decay_constant", time),
benchmark:
get_pattern_benchmark_channel(config, "par_dsp_decay_constant", time)
group:
"par-dsp"
resources:
Expand Down Expand Up @@ -101,6 +104,8 @@ rule build_pars_evtsel_geds:
),
log:
get_pattern_log_channel(config, "par_dsp_event_selection", time),
benchmark:
get_pattern_benchmark_channel(config, "par_dsp_event_selection", time)
group:
"par-dsp"
resources:
Expand Down Expand Up @@ -168,6 +173,8 @@ rule build_pars_dsp_nopt_geds:
),
log:
get_pattern_log_channel(config, "par_dsp_noise_optimization", time),
benchmark:
get_pattern_benchmark_channel(config, "par_dsp_noise_optimization", time)
group:
"par-dsp"
resources:
Expand Down Expand Up @@ -234,6 +241,8 @@ rule build_pars_dsp_dplms_geds:
dsp_plots=temp(get_pattern_plts_tmp_channel(config, "dsp", "dplms")),
log:
get_pattern_log_channel(config, "pars_dsp_dplms", time),
benchmark:
get_pattern_benchmark_channel(config, "pars_dsp_dplms", time)
group:
"par-dsp"
resources:
Expand Down Expand Up @@ -303,6 +312,8 @@ rule build_pars_dsp_eopt_geds:
dsp_plots=temp(get_pattern_plts_tmp_channel(config, "dsp", "eopt")),
log:
get_pattern_log_channel(config, "pars_dsp_eopt", time),
benchmark:
get_pattern_benchmark_channel(config, "pars_dsp_eopt", time)
group:
"par-dsp"
resources:
Expand Down
2 changes: 2 additions & 0 deletions workflow/rules/dsp_pars_spms.smk
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ rule build_pars_dsp_tau_spms:
patt.get_pattern_pars(config, "dsp", name="spms", datatype="{datatype}"),
log:
patt.get_pattern_log(config, "pars_spms", time),
benchmark:
patt.get_pattern_benchmark(config, "pars_spms", time)
wildcard_constraints:
datatype=r"\b(?!cal\b|xtc\b)\w+\b",
group:
Expand Down
3 changes: 3 additions & 0 deletions workflow/rules/psp.smk
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ from legenddataflow.methods.patterns import (
get_pattern_tier,
get_pattern_log,
get_pattern_pars,
get_pattern_benchmark,
)
from legenddataflow.methods.paths import config_path
from legenddataflowscripts.workflow import execenv_pyexe
Expand Down Expand Up @@ -38,6 +39,8 @@ rule build_psp:
tier_file=get_pattern_tier(config, "psp", check_in_cycle=check_in_cycle),
log:
get_pattern_log(config, "tier_psp", time),
benchmark:
get_pattern_benchmark(config, "tier_psp", time)
group:
"tier-dsp"
threads: get_threads
Expand Down
5 changes: 5 additions & 0 deletions workflow/rules/psp_pars_geds.smk
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ from legenddataflow.methods.patterns import (
get_pattern_log,
get_pattern_pars,
get_pattern_tier,
get_pattern_benchmark_channel,
)
from legenddataflow.methods.paths import config_path
from legenddataflowscripts.workflow import execenv_pyexe, set_last_rule_name
Expand Down Expand Up @@ -306,6 +307,8 @@ rule build_par_psp_fallback:
psp_plots=temp(get_pattern_plts_tmp_channel(config, "psp", "eopt")),
log:
get_pattern_log_channel(config, "pars_psp", time),
benchmark:
get_pattern_benchmark_channel(config, "pars_psp", time)
group:
"par-psp"
resources:
Expand Down Expand Up @@ -354,6 +357,8 @@ rule build_pars_psp_dplms_geds_fallback:
plots=temp(get_pattern_plts_tmp_channel(config, "psp")),
log:
get_pattern_log_channel(config, "pars_psp_dplms", time),
benchmark:
get_pattern_benchmark_channel(config, "pars_psp_dplms", time)
group:
"par-psp"
resources:
Expand Down
4 changes: 4 additions & 0 deletions workflow/src/legenddataflow/methods/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,9 @@ def tmp_log_path(setup):
return setup["paths"]["tmp_log"]


def tmp_benchmark_path(setup):
return setup["paths"]["tmp_benchmark"]


def filelist_path(setup):
return setup["paths"]["tmp_filelists"]
29 changes: 29 additions & 0 deletions workflow/src/legenddataflow/methods/patterns.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
tier_daq_path,
tier_path,
tier_raw_blind_path,
tmp_benchmark_path,
tmp_log_path,
tmp_par_path,
tmp_plts_path,
Expand Down Expand Up @@ -341,3 +342,31 @@ def get_pattern_log_concat(setup, processing_step, time):
/ processing_step
/ ("{experiment}-{period}-{run}-{datatype}-" + processing_step + ".log")
)


def get_pattern_benchmark(setup, processing_step, time):
return (
Path(f"{tmp_benchmark_path(setup)}")
/ time
/ processing_step
/ (
"{experiment}-{period}-{run}-{datatype}-{timestamp}-"
+ processing_step
+ ".tsv"
)
)


def get_pattern_benchmark_channel(setup, processing_step, time, datatype="cal"):
return (
Path(f"{tmp_benchmark_path(setup)}")
/ time
/ processing_step
/ (
"{experiment}-{period}-{run}-"
+ datatype
+ "-{timestamp}-{channel}-"
+ processing_step
+ ".tsv"
)
)
5 changes: 4 additions & 1 deletion workflow/src/legenddataflow/scripts/par/geds/pht/fast.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,10 @@ def par_geds_pht_fast() -> None:
save_dict_to_files(
sorted(args.hit_pars),
{
tstamp: {"pars": {"operations":cal_dicts[tstamp]}, "results": results_dicts[tstamp]}
tstamp: {
"pars": {"operations": cal_dicts[tstamp]},
"results": results_dicts[tstamp],
}
for tstamp in cal_dicts
},
)
Expand Down
Loading