diff options
author | Thomas White <taw@physics.org> | 2020-11-30 16:43:17 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2020-11-30 17:32:30 +0100 |
commit | d6f6658a29ed309b47a0b8fd0fc6bfdb023cb258 (patch) | |
tree | 6395e024e78c77d319a90082b248fa2007aaf654 /src | |
parent | 27c00c6dde58d6e4f7a7f2f3a9b00fd001f2dcff (diff) |
Pass result to backend for merging
Diffstat (limited to 'src')
-rw-r--r-- | src/gui_backend_local.c | 1 | ||||
-rw-r--r-- | src/gui_backend_slurm.c | 1 | ||||
-rw-r--r-- | src/gui_merge.c | 12 | ||||
-rw-r--r-- | src/gui_project.h | 19 |
4 files changed, 23 insertions, 10 deletions
diff --git a/src/gui_backend_local.c b/src/gui_backend_local.c index 34a8fe03..4e630ad2 100644 --- a/src/gui_backend_local.c +++ b/src/gui_backend_local.c @@ -416,6 +416,7 @@ static GtkWidget *make_merging_parameters_widget(void *opts_priv) static void *run_merging(const char *job_title, const char *job_notes, struct crystfelproject *proj, + struct gui_result *input, void *opts_priv) { return NULL; diff --git a/src/gui_backend_slurm.c b/src/gui_backend_slurm.c index 0011131c..7c19f426 100644 --- a/src/gui_backend_slurm.c +++ b/src/gui_backend_slurm.c @@ -694,6 +694,7 @@ static void read_indexing_opt(void *opts_priv, static void *run_merging(const char *job_title, const char *job_notes, struct crystfelproject *proj, + struct gui_result *input, void *opts_priv) { return NULL; diff --git a/src/gui_merge.c b/src/gui_merge.c index 971f49fc..6d0afe35 100644 --- a/src/gui_merge.c +++ b/src/gui_merge.c @@ -94,9 +94,19 @@ static int run_merging(struct crystfelproject *proj, { struct crystfel_backend *be; void *job_priv; + const gchar *results_name; + struct gui_result *input; + + /* Which result to merge? */ + results_name = gtk_combo_box_get_active_id(GTK_COMBO_BOX(proj->results_combo)); + input = find_result_by_name(proj, results_name); + if ( input == NULL ) { + ERROR("Please select a result first\n"); + return 1; + } be = &proj->backends[backend_idx]; - job_priv = be->run_merging(job_title, job_notes, proj, + job_priv = be->run_merging(job_title, job_notes, proj, input, be->merging_opts_priv); if ( job_priv != NULL ) { diff --git a/src/gui_project.h b/src/gui_project.h index bb35eb0c..d892f7c3 100644 --- a/src/gui_project.h +++ b/src/gui_project.h @@ -114,6 +114,15 @@ struct merging_params { float push_res; }; +struct gui_result +{ + char *name; + + int n_streams; + char **streams; + StreamIndex **indices; +}; + struct crystfelproject; struct crystfel_backend { @@ -158,6 +167,7 @@ struct crystfel_backend { void *(*run_merging)(const char *job_title, const char *job_notes, struct crystfelproject *proj, + struct gui_result *input, void *opts_priv); /* Called to ask the backend to write its merging options */ @@ -183,15 +193,6 @@ struct gui_task void *job_priv; }; -struct gui_result -{ - char *name; - - int n_streams; - char **streams; - StreamIndex **indices; -}; - struct crystfelproject { GtkWidget *window; |