mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-05-03 16:34:13 +02:00
Make bernina writer SF writer
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
using namespace std;
|
||||
using s_ptr = shared_ptr<h5_base>;
|
||||
|
||||
class BerninaFormat : public H5Format
|
||||
class SfFormat : public H5Format
|
||||
{
|
||||
shared_ptr<unordered_map<string, DATA_TYPE>> input_value_type = NULL;
|
||||
shared_ptr<unordered_map<string, boost::any>> default_values = NULL;
|
||||
@@ -15,9 +15,9 @@ class BerninaFormat : public H5Format
|
||||
shared_ptr<h5_parent> file_format = NULL;
|
||||
|
||||
public:
|
||||
~BerninaFormat(){};
|
||||
~SfFormat(){};
|
||||
|
||||
BerninaFormat(const string& dataset_name, int n_bad_modules)
|
||||
SfFormat(const string& dataset_name, int n_bad_modules)
|
||||
{
|
||||
// Input values definition type.
|
||||
// Which type should be the parameters you receive over the REST api.
|
||||
@@ -1,6 +1,6 @@
|
||||
package:
|
||||
name: bernina_h5_writer
|
||||
version: 0.0.1
|
||||
name: sf_h5_writer
|
||||
version: 0.1.0
|
||||
|
||||
build:
|
||||
number: 0
|
||||
@@ -23,4 +23,4 @@ requirements:
|
||||
|
||||
|
||||
about:
|
||||
summary: "Bernina ZMQ to H5 writer."
|
||||
summary: "SF ZMQ to H5 writer."
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
#include "ZmqReceiver.hpp"
|
||||
#include "ProcessManager.hpp"
|
||||
|
||||
#include "BerninaFormat.cpp"
|
||||
#include "SfFormat.cpp"
|
||||
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
if (argc != 10) {
|
||||
cout << endl;
|
||||
cout << "Usage: bernina_h5_writer [connection_address] [output_file] [n_frames]";
|
||||
cout << "Usage: sf_h5_writer [connection_address] [output_file] [n_frames]";
|
||||
cout << " [rest_port] [user_id] [bsread_address] [n_modules] [n_bad_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;
|
||||
@@ -64,7 +64,7 @@ int main (int argc, char *argv[])
|
||||
{"module_number", HeaderDataType("uint64", n_modules)}
|
||||
});
|
||||
|
||||
BerninaFormat format(detector_name, n_bad_modules);
|
||||
SfFormat format(detector_name, n_bad_modules);
|
||||
|
||||
WriterManager writer_manager(format.get_input_value_type(), output_file, n_frames);
|
||||
ZmqReceiver receiver(connect_address, config::zmq_n_io_threads, config::zmq_receive_timeout, header_values);
|
||||
Reference in New Issue
Block a user