From 99849c8ed87a424a76e4826ed39ad65cacfaecfb Mon Sep 17 00:00:00 2001 From: Thomas White Date: Mon, 24 Apr 2023 16:52:16 +0200 Subject: indexamajig: Hooks for Mille --- src/im-sandbox.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/im-sandbox.c') 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); -- cgit v1.2.3