mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-05-02 11:34:13 +02:00
Add stop_writing method to H5WriteModule
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
#ifndef H5WRITERMODULE_H
|
||||
#define H5WRITERMODULE_H
|
||||
|
||||
#include <thread>
|
||||
#include "RingBuffer.hpp"
|
||||
#include "ZmqReceiver.hpp"
|
||||
#include "H5Format.hpp"
|
||||
|
||||
class H5WriteModule {
|
||||
typedef std::unordered_map<std::string, HeaderDataType> header_map;
|
||||
|
||||
RingBuffer& ring_buffer_;
|
||||
const header_map& header_values_;
|
||||
const H5Format& format_;
|
||||
std::atomic_bool is_writing_;
|
||||
std::thread writing_thread_;
|
||||
|
||||
protected:
|
||||
void write_thread();
|
||||
|
||||
public:
|
||||
H5WriteModule(
|
||||
RingBuffer& ring_buffer,
|
||||
const header_map& header_values,
|
||||
const H5Format& format);
|
||||
|
||||
void start_writing();
|
||||
void stop_writing();
|
||||
};
|
||||
|
||||
|
||||
#endif //H5WRITERMODULE_H
|
||||
Reference in New Issue
Block a user