mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-05-21 15:10:55 +02:00
Improving writer manager
This commit is contained in:
@@ -4,29 +4,36 @@
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <atomic>
|
||||
#include <mutex>
|
||||
#include <boost/any.hpp>
|
||||
|
||||
#include "H5Format.hpp"
|
||||
|
||||
class WriterManager
|
||||
{
|
||||
|
||||
std::map<std::string, boost::any> parameters = {};
|
||||
std::mutex parameters_mutex;
|
||||
|
||||
// Initialize in constructor.
|
||||
std::map<std::string, DATA_TYPE>* parameters_type;
|
||||
size_t n_images;
|
||||
std::atomic_bool running_flag;
|
||||
std::atomic_bool killed_flag;
|
||||
std::atomic<uint64_t> n_received_frames;
|
||||
std::atomic<uint64_t> n_written_frames;
|
||||
|
||||
public:
|
||||
WriterManager(std::map<std::string, DATA_TYPE>* parameters_type, uint64_t n_images=0);
|
||||
void stop();
|
||||
void kill();
|
||||
bool is_running();
|
||||
bool is_killed();
|
||||
std::string get_status();
|
||||
|
||||
bool are_all_parameters_set();
|
||||
|
||||
std::map<std::string, DATA_TYPE>* get_parameters_type();
|
||||
std::map<std::string, boost::any>& get_parameters();
|
||||
std::map<std::string, boost::any> get_parameters();
|
||||
void set_parameters(std::map<std::string, boost::any>& new_parameters);
|
||||
|
||||
std::map<std::string, uint64_t> get_statistics();
|
||||
|
||||
Reference in New Issue
Block a user