diff options
author | Valerio Mariani <valerio.mariani@desy.de> | 2014-07-10 16:35:50 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2014-07-21 15:31:58 +0200 |
commit | 282dee197bce06f9d37655c1775f53f6646e2e5d (patch) | |
tree | cef8f4803f75b4e78dd77202da3fe479dbc66014 /src | |
parent | 0508fc381cda5a3ead7069624ae5036183eee840 (diff) |
Copy geometry file into stream
Diffstat (limited to 'src')
-rw-r--r-- | src/indexamajig.c | 6 | ||||
-rw-r--r-- | src/partial_sim.c | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/indexamajig.c b/src/indexamajig.c index d75e24be..fcf97dd4 100644 --- a/src/indexamajig.c +++ b/src/indexamajig.c @@ -197,6 +197,7 @@ int main(int argc, char *argv[]) char *int_str = NULL; char *tempdir = NULL; char *int_diag = NULL; + char *geom_filename = NULL; /* Defaults */ iargs.cell = NULL; @@ -335,6 +336,7 @@ int main(int argc, char *argv[]) break; case 'g' : + geom_filename = optarg; iargs.det = get_detector_geometry(optarg); if ( iargs.det == NULL ) { ERROR("Failed to read detector geometry from " @@ -654,15 +656,13 @@ int main(int argc, char *argv[]) } - st = open_stream_for_write(outfile); + st = open_stream_for_write_2(outfile, geom_filename, argc, argv); if ( st == NULL ) { ERROR("Failed to open stream '%s'\n", outfile); return 1; } free(outfile); - write_command(st, argc, argv); - /* Prepare the indexer */ if ( indm != NULL ) { ipriv = prepare_indexing(indm, iargs.cell, iargs.det, diff --git a/src/partial_sim.c b/src/partial_sim.c index 862eadef..a113532b 100644 --- a/src/partial_sim.c +++ b/src/partial_sim.c @@ -689,15 +689,13 @@ int main(int argc, char *argv[]) ERROR("You must give a filename for the output.\n"); return 1; } - stream = open_stream_for_write(output_file); + stream = open_stream_for_write_2(output_file, geomfile, argc, argv); if ( stream == NULL ) { ERROR("Couldn't open output file '%s'\n", output_file); return 1; } free(output_file); - write_command(stream, argc, argv); - image.det = det; image.width = det->max_fs + 1; image.height = det->max_ss + 1; |