diff --git a/lib/src/ProcessManager.cpp b/lib/src/ProcessManager.cpp index 0a31a87..07d835d 100644 --- a/lib/src/ProcessManager.cpp +++ b/lib/src/ProcessManager.cpp @@ -72,6 +72,12 @@ void ProcessManager::notify_last_pulse_id(uint64_t pulse_id) } catch (...){} } +void ProcessManager::run_writer(std::string output_file, uint64_t n_frames) +{ + + +} + void ProcessManager::run_receivers(uint8_t n_receiving_threads) { @@ -98,7 +104,6 @@ void ProcessManager::run_receivers(uint8_t n_receiving_threads) // In case SIGINT stopped the rest_api. writer_manager.stop(); - writer_manager.kill(); receivers.join_all(); diff --git a/lib/src/ProcessManager.hpp b/lib/src/ProcessManager.hpp index 2567e2e..08fab78 100644 --- a/lib/src/ProcessManager.hpp +++ b/lib/src/ProcessManager.hpp @@ -21,18 +21,22 @@ class ProcessManager void notify_first_pulse_id(uint64_t pulse_id); void notify_last_pulse_id(uint64_t pulse_id); - - public: - ProcessManager(WriterManager& writer_manager, ZmqReceiver& receiver, - RingBuffer& ring_buffer, const H5Format& format, uint16_t rest_port, const std::string& bsread_rest_address, hsize_t frames_per_file=0); - - void run_receivers(uint8_t n_receiving_threads); + + protected: void receive_zmq(); void write_h5(std::string output_file, uint64_t n_frames); void write_h5_format(H5::H5File& file); + + public: + ProcessManager(WriterManager& writer_manager, ZmqReceiver& receiver, + RingBuffer& ring_buffer, const H5Format& format, uint16_t rest_port, const std::string& bsread_rest_address, hsize_t frames_per_file=0); + + void run_receivers(uint8_t n_receiving_threads); + void run_writer(std::string output_file, uint64_t n_frames); + }; #endif