aboutsummaryrefslogtreecommitdiff
path: root/src/im-sandbox.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2023-04-24 16:52:16 +0200
committerThomas White <taw@physics.org>2023-07-28 13:22:04 +0200
commit99849c8ed87a424a76e4826ed39ad65cacfaecfb (patch)
tree23c1b0f505527cf7550f65e0f004d505e2efe2a9 /src/im-sandbox.c
parentc8fb149760f7a8ef4e018f22e79bcb48e1e3c444 (diff)
indexamajig: Hooks for Mille
Diffstat (limited to 'src/im-sandbox.c')
-rw-r--r--src/im-sandbox.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/im-sandbox.c b/src/im-sandbox.c
index a91c6a87..c3f2ca70 100644
--- a/src/im-sandbox.c
+++ b/src/im-sandbox.c
@@ -69,6 +69,7 @@
#include "im-zmq.h"
#include "profile.h"
#include "im-asapo.h"
+#include "predict-refine.h"
struct sandbox
@@ -340,6 +341,7 @@ static int run_work(const struct index_args *iargs, Stream *st,
int allDone = 0;
struct im_zmq *zmqstuff = NULL;
struct im_asapo *asapostuff = NULL;
+ Mille *mille;
if ( sb->profile ) {
profile_init();
@@ -363,6 +365,14 @@ static int run_work(const struct index_args *iargs, Stream *st,
}
}
+ if ( iargs->mille ) {
+ char tmp[64];
+ snprintf(tmp, 63, "mille-data-%i.bin", cookie);
+ mille = crystfel_mille_new(tmp, 1, 0);
+ } else {
+ mille = NULL;
+ }
+
while ( !allDone ) {
struct pattern_args pargs;
@@ -519,7 +529,7 @@ static int run_work(const struct index_args *iargs, Stream *st,
profile_start("process-image");
process_image(iargs, &pargs, st, cookie, tmpdir, ser,
sb->shared, sb->shared->last_task[cookie],
- asapostuff);
+ asapostuff, mille);
profile_end("process-image");
}
@@ -536,6 +546,8 @@ static int run_work(const struct index_args *iargs, Stream *st,
free(pargs.event);
}
+ crystfel_mille_free(mille);
+
/* These are both no-ops if argument is NULL */
im_zmq_shutdown(zmqstuff);
im_asapo_shutdown(asapostuff);