From bda480005b278f82800d830d133d4cdba4ea5d97 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 4 May 2018 13:46:10 +0200 Subject: Put list of indexing methods into stream header Needed for when the methods are auto-determined. --- libcrystfel/src/stream.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'libcrystfel/src/stream.c') diff --git a/libcrystfel/src/stream.c b/libcrystfel/src/stream.c index db6c6199..47661946 100644 --- a/libcrystfel/src/stream.c +++ b/libcrystfel/src/stream.c @@ -1499,12 +1499,13 @@ static void write_cell_to_stream(Stream *st, UnitCell *cell) /** - * open_stream_for_write_3 + * open_stream_for_write_4 * @filename: Filename of new stream * @geom_filename: The geometry filename to copy * @cell: A %UnitCell to write into the stream * @argc: The number of arguments to the program * @argv: The arguments to the program + * @indm_str: The list of indexing methods * * Creates a new stream with name @filename, and adds the stream format * and version header, plus a verbatim copy of the geometry file and the unit @@ -1512,9 +1513,9 @@ static void write_cell_to_stream(Stream *st, UnitCell *cell) * * Returns: a %Stream, or NULL on failure. */ -Stream *open_stream_for_write_3(const char *filename, +Stream *open_stream_for_write_4(const char *filename, const char *geom_filename, UnitCell *cell, - int argc, char *argv[]) + int argc, char *argv[], const char *indm_str) { Stream *st; @@ -1542,6 +1543,10 @@ Stream *open_stream_for_write_3(const char *filename, if ( (argc > 0) && (argv != NULL) ) { write_command(st, argc, argv); } + + if ( indm_str != NULL ) { + fprintf(st->fh, "Indexing methods selected: %s\n", indm_str); + } if ( geom_filename != NULL ) { write_geometry_file(st, geom_filename); } @@ -1553,6 +1558,15 @@ Stream *open_stream_for_write_3(const char *filename, } +Stream *open_stream_for_write_3(const char *filename, + const char *geom_filename, UnitCell *cell, + int argc, char *argv[]) +{ + return open_stream_for_write_4(filename, geom_filename, cell, + argc, argv, NULL); +} + + /** * open_stream_for_write_2 * @filename: Filename of new stream -- cgit v1.2.3