diff --git a/jf-assembler/src/EigerAssembler.cpp b/jf-assembler/src/EigerAssembler.cpp index f42e685..afc4c0a 100644 --- a/jf-assembler/src/EigerAssembler.cpp +++ b/jf-assembler/src/EigerAssembler.cpp @@ -69,6 +69,8 @@ void EigerAssembler::assemble_image(const char* src_meta, image_meta->dtype = (bit_depth_ <= 8) ? 1 : bit_depth_ / 8; image_meta->encoding = 0; image_meta->source_id = 0; + image_meta->user_1 = 0; + image_meta->user_2 = 0; is_pulse_init = 1; #ifdef DEBUG_OUTPUT using namespace date; diff --git a/std-det-writer/src/main.cpp b/std-det-writer/src/main.cpp index c7bc38d..33197ab 100644 --- a/std-det-writer/src/main.cpp +++ b/std-det-writer/src/main.cpp @@ -62,7 +62,7 @@ int main (int argc, char *argv[]) } const string output_file = document["output_file"].GetString(); - const uint64_t image_id = document["image_metadata"]["id"].GetUint64(); + const uint64_t image_id = document["image_id"].GetUint64(); const int run_id = document["run_id"].GetInt(); const int i_image = document["i_image"].GetInt(); const int n_images = document["n_images"].GetInt(); @@ -75,6 +75,13 @@ int main (int argc, char *argv[]) continue; } + // i_image == n_images -> end of run. + if (i_image == n_images) { + writer.close_run(); + stats.end_run(); + continue; + } + // i_image == 0 -> we have a new run. if (i_image == 0) { auto image_meta = (ImageMetadata*)