From 55d7f3c71200736e00e9a265f969368e8cf4915e Mon Sep 17 00:00:00 2001 From: Andrej Babic Date: Mon, 16 Jul 2018 16:54:38 +0200 Subject: [PATCH] Adding n_bad_modules to bernina --- sf_bernina/bernina_h5_writer.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sf_bernina/bernina_h5_writer.cpp b/sf_bernina/bernina_h5_writer.cpp index 337e48d..5a0d5c4 100644 --- a/sf_bernina/bernina_h5_writer.cpp +++ b/sf_bernina/bernina_h5_writer.cpp @@ -11,10 +11,10 @@ int main (int argc, char *argv[]) { - if (argc != 9) { + if (argc != 10) { cout << endl; cout << "Usage: bernina_h5_writer [connection_address] [output_file] [n_frames]"; - cout << " [rest_port] [user_id] [bsread_address] [n_modules] [dataset_name]" << endl; + cout << " [rest_port] [user_id] [bsread_address] [n_modules] [detector_name]" << endl; cout << "\tconnection_address: Address to connect to the stream (PULL). Example: tcp://127.0.0.1:40000" << endl; cout << "\toutput_file: Name of the output file." << endl; cout << "\tn_frames: Number of images to acquire. 0 for infinity (until /stop is called)." << endl; @@ -22,7 +22,8 @@ int main (int argc, char *argv[]) cout << "\tuser_id: uid under which to run the writer. -1 to leave it as it is." << endl; cout << "\tbsread_address: HTTP address of the bsread REST api." << endl; cout << "\tn_modules: Number of detector modules to be written." << endl; - cout << "\tdataset_name: Name of the detector data dataset in the file format." << endl; + cout << "\tn_bad_modules: Number of detector modules which has more then half bad pixels" << endl; + cout << "\tdetector_name: Name of the detector, data will be written as data/detector_name/ " << endl; cout << endl; exit(-1); @@ -35,7 +36,8 @@ int main (int argc, char *argv[]) int user_id = atoi(argv[5]); string bsread_rest_address = string(argv[6]); int n_modules = atoi(argv[7]); - string dataset_name = string(argv[8]); + int n_bad_modules = atoi(argv[8]); + string detector_name = string(argv[9]); if (user_id != -1) { writer_utils::set_process_id(user_id); @@ -43,7 +45,7 @@ int main (int argc, char *argv[]) writer_utils::create_destination_folder(output_file); - BerninaFormat format(dataset_name); + BerninaFormat format(detector_name,n_bad_modules); WriterManager manager(format.get_input_value_type(), output_file, n_frames); auto header_values = shared_ptr>(new unordered_map { @@ -70,4 +72,4 @@ int main (int argc, char *argv[]) ProcessManager::run_writer(manager, format, receiver, rest_port, bsread_rest_address); return 0; -} \ No newline at end of file +}