aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-12-11 14:21:49 +0100
committerThomas White <taw@physics.org>2020-12-11 14:21:49 +0100
commitd8672864f60291214b445f8a658c642086aab8bc (patch)
tree9bf951b5caa86dd88a366b00a4c33ce2a7812a03
parente9b583b2c63d14e859223bce4b56afe3fe04815c (diff)
result -> indexing_result
Because shortly we will have merging_result as well
-rw-r--r--src/crystfel_gui.c10
-rw-r--r--src/gui_backend_local.c4
-rw-r--r--src/gui_backend_slurm.c6
-rw-r--r--src/gui_index.c4
-rw-r--r--src/gui_merge.c10
-rw-r--r--src/gui_merge.h2
-rw-r--r--src/gui_project.c48
-rw-r--r--src/gui_project.h26
8 files changed, 55 insertions, 55 deletions
diff --git a/src/crystfel_gui.c b/src/crystfel_gui.c
index ad745d9c..6a88beb1 100644
--- a/src/crystfel_gui.c
+++ b/src/crystfel_gui.c
@@ -190,10 +190,10 @@ void update_imageview(struct crystfelproject *proj)
if ( strcmp(results_name, "crystfel-gui-internal") == 0 ) {
update_peaks(proj);
} else {
- struct image *res_im = find_result(proj,
- results_name,
- image->filename,
- image->ev);
+ struct image *res_im = find_indexed_image(proj,
+ results_name,
+ image->filename,
+ image->ev);
if ( res_im != NULL ) {
swap_data_arrays(image, res_im);
image_free(proj->cur_image);
@@ -439,7 +439,7 @@ static void finddata_response_sig(GtkWidget *dialog, gint resp,
if ( streams != NULL ) {
char *result_name = safe_basename(stream_filename);
streams[0] = strdup(stream_filename);
- add_result(proj, result_name, streams, 1);
+ add_indexing_result(proj, result_name, streams, 1);
select_result(proj, result_name);
}
diff --git a/src/gui_backend_local.c b/src/gui_backend_local.c
index 42d01883..b5c38b5a 100644
--- a/src/gui_backend_local.c
+++ b/src/gui_backend_local.c
@@ -252,7 +252,7 @@ static struct local_job *start_local_job(char **args,
"crystfel.stream");
streams[0] = g_file_get_path(stream_gfile);
g_object_unref(stream_gfile);
- add_result(proj, strdup(job_title), streams, 1);
+ add_indexing_result(proj, strdup(job_title), streams, 1);
}
g_object_unref(workdir_file);
@@ -448,7 +448,7 @@ static gboolean merge_readable(GIOChannel *source, GIOCondition cond,
static void *run_merging(const char *job_title,
const char *job_notes,
struct crystfelproject *proj,
- struct gui_result *input,
+ struct gui_indexing_result *input,
void *opts_priv)
{
char n_thread_str[64];
diff --git a/src/gui_backend_slurm.c b/src/gui_backend_slurm.c
index d572a9b4..74396699 100644
--- a/src/gui_backend_slurm.c
+++ b/src/gui_backend_slurm.c
@@ -502,8 +502,8 @@ static void *run_indexing(const char *job_title,
free(job);
return NULL;
} else {
- add_result(proj, strdup(job_title),
- streams, job->n_blocks);
+ add_indexing_result(proj, strdup(job_title),
+ streams, job->n_blocks);
}
return job;
}
@@ -734,7 +734,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,
+ struct gui_indexing_result *input,
void *opts_priv)
{
struct slurm_job *job;
diff --git a/src/gui_index.c b/src/gui_index.c
index 91d1f15a..89fd62e7 100644
--- a/src/gui_index.c
+++ b/src/gui_index.c
@@ -62,7 +62,7 @@ void cell_explorer_sig(GtkWidget *widget, struct crystfelproject *proj)
GSubprocess *sp;
GError *error = NULL;
const gchar *results_name;
- struct gui_result *res;
+ struct gui_indexing_result *res;
const gchar **streams;
int i;
@@ -72,7 +72,7 @@ void cell_explorer_sig(GtkWidget *widget, struct crystfelproject *proj)
return;
}
- res = find_result_by_name(proj, results_name);
+ res = find_indexing_result_by_name(proj, results_name);
if ( res == NULL ) {
ERROR("Results for '%s' not found!\n", results_name);
return;
diff --git a/src/gui_merge.c b/src/gui_merge.c
index 18add58c..bea9b378 100644
--- a/src/gui_merge.c
+++ b/src/gui_merge.c
@@ -95,11 +95,11 @@ static int run_merging(struct crystfelproject *proj,
struct crystfel_backend *be;
void *job_priv;
const gchar *results_name;
- struct gui_result *input;
+ struct gui_indexing_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);
+ input = find_indexing_result_by_name(proj, results_name);
if ( input == NULL ) {
ERROR("Please select a result first\n");
return 1;
@@ -402,7 +402,7 @@ static GSList *append_arg_float(GSList *args,
}
-static GSList *process_hkl_command_line(struct gui_result *input,
+static GSList *process_hkl_command_line(struct gui_indexing_result *input,
struct merging_params *params)
{
GSList *args = NULL;
@@ -440,7 +440,7 @@ static GSList *process_hkl_command_line(struct gui_result *input,
static GSList *partialator_command_line(const char *n_thread_str,
- struct gui_result *input,
+ struct gui_indexing_result *input,
struct merging_params *params)
{
GSList *args = NULL;
@@ -505,7 +505,7 @@ static GSList *partialator_command_line(const char *n_thread_str,
char **merging_command_line(const char *n_thread_str,
- struct gui_result *input,
+ struct gui_indexing_result *input,
struct merging_params *params)
{
GSList *args;
diff --git a/src/gui_merge.h b/src/gui_merge.h
index 474eccc1..20e5b7b1 100644
--- a/src/gui_merge.h
+++ b/src/gui_merge.h
@@ -37,7 +37,7 @@ extern gint merge_sig(GtkWidget *widget,
struct crystfelproject *proj);
extern char **merging_command_line(const char *n_thread_str,
- struct gui_result *input,
+ struct gui_indexing_result *input,
struct merging_params *params);
#endif
diff --git a/src/gui_project.c b/src/gui_project.c
index 53874121..f909eb29 100644
--- a/src/gui_project.c
+++ b/src/gui_project.c
@@ -521,7 +521,7 @@ static char **add_stream(char *new_stream,
{
int i = *pn_streams;
char **new_streams = realloc(streams,
- (i+1)*sizeof(struct gui_result));
+ (i+1)*sizeof(struct gui_indexing_result));
if ( new_streams == NULL ) return streams;
new_streams[i] = new_stream;
@@ -579,10 +579,10 @@ static void read_results(FILE *fh, struct crystfelproject *proj)
if ( n_streams > 0 ) {
/* Add the previously-read result */
- add_result(proj,
- results_name,
- streams,
- n_streams);
+ add_indexing_result(proj,
+ results_name,
+ streams,
+ n_streams);
if ( selected ) {
select_result(proj, results_name);
@@ -608,10 +608,10 @@ static void read_results(FILE *fh, struct crystfelproject *proj)
if ( strcmp(line, "-----") == 0 ) {
if ( n_streams > 0 ) {
- add_result(proj,
- results_name,
- streams,
- n_streams);
+ add_indexing_result(proj,
+ results_name,
+ streams,
+ n_streams);
if ( selected ) {
select_result(proj, results_name);
@@ -984,16 +984,16 @@ void default_project(struct crystfelproject *proj)
/* Assumes ownership of "name" and "streams" */
-int add_result(struct crystfelproject *proj,
- char *name,
- char **streams,
- int n_streams)
+int add_indexing_result(struct crystfelproject *proj,
+ char *name,
+ char **streams,
+ int n_streams)
{
int i;
- struct gui_result *new_results;
+ struct gui_indexing_result *new_results;
new_results = realloc(proj->results,
- (proj->n_results+1)*sizeof(struct gui_result));
+ (proj->n_results+1)*sizeof(struct gui_indexing_result));
if ( new_results == NULL ) return 1;
new_results[proj->n_results].name = name;
@@ -1015,7 +1015,7 @@ int add_result(struct crystfelproject *proj,
}
-static void update_result_index(struct gui_result *result)
+static void update_result_index(struct gui_indexing_result *result)
{
int i;
@@ -1030,8 +1030,8 @@ static void update_result_index(struct gui_result *result)
}
-struct gui_result *find_result_by_name(struct crystfelproject *proj,
- const char *name)
+struct gui_indexing_result *find_indexing_result_by_name(struct crystfelproject *proj,
+ const char *name)
{
int i;
@@ -1044,18 +1044,18 @@ struct gui_result *find_result_by_name(struct crystfelproject *proj,
}
-struct image *find_result(struct crystfelproject *proj,
- const char *results_name,
- const char *filename,
- const char *event)
+struct image *find_indexed_image(struct crystfelproject *proj,
+ const char *results_name,
+ const char *filename,
+ const char *event)
{
Stream *st;
int i;
int found = 0;
struct image *image;
- struct gui_result *result;
+ struct gui_indexing_result *result;
- result = find_result_by_name(proj, results_name);
+ result = find_indexing_result_by_name(proj, results_name);
if ( result == NULL ) return NULL;
for ( i=0; i<result->n_streams; i++ ) {
diff --git a/src/gui_project.h b/src/gui_project.h
index d892f7c3..e1f47712 100644
--- a/src/gui_project.h
+++ b/src/gui_project.h
@@ -114,7 +114,7 @@ struct merging_params {
float push_res;
};
-struct gui_result
+struct gui_indexing_result
{
char *name;
@@ -167,7 +167,7 @@ struct crystfel_backend {
void *(*run_merging)(const char *job_title,
const char *job_notes,
struct crystfelproject *proj,
- struct gui_result *input,
+ struct gui_indexing_result *input,
void *opts_priv);
/* Called to ask the backend to write its merging options */
@@ -253,7 +253,7 @@ struct crystfelproject {
struct gui_task tasks[MAX_RUNNING_TASKS];
int n_running_tasks;
- struct gui_result *results;
+ struct gui_indexing_result *results;
int n_results;
};
@@ -273,17 +273,17 @@ extern void add_file_to_project(struct crystfelproject *proj,
extern void clear_project_files(struct crystfelproject *proj);
-extern int add_result(struct crystfelproject *proj,
- char *name,
- char **streams,
- int n_streams);
+extern int add_indexing_result(struct crystfelproject *proj,
+ char *name,
+ char **streams,
+ int n_streams);
-extern struct image *find_result(struct crystfelproject *proj,
- const char *result_name,
- const char *filename,
- const char *event);
+extern struct image *find_indexed_image(struct crystfelproject *proj,
+ const char *result_name,
+ const char *filename,
+ const char *event);
-extern struct gui_result *find_result_by_name(struct crystfelproject *proj,
- const char *name);
+extern struct gui_indexing_result *find_indexing_result_by_name(struct crystfelproject *proj,
+ const char *name);
#endif