mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-05-03 15:04:11 +02:00
Started refactoring of WriterManager
This commit is contained in:
@@ -48,15 +48,14 @@ void writer_utils::create_destination_folder(const string& output_file)
|
||||
}
|
||||
}
|
||||
|
||||
WriterManager::WriterManager(const unordered_map<string, DATA_TYPE>& parameters_type,
|
||||
const string& output_file, uint64_t n_frames):
|
||||
parameters_type(parameters_type), output_file(output_file), n_frames(n_frames),
|
||||
running_flag(true), killed_flag(false), n_received_frames(0), n_written_frames(0), n_lost_frames(0)
|
||||
WriterManager::WriterManager(const unordered_map<string, DATA_TYPE>& parameters_type):
|
||||
parameters_type(parameters_type), running_flag(true), killed_flag(false),
|
||||
n_received_frames(0), n_written_frames(0), n_lost_frames(0)
|
||||
{
|
||||
#ifdef DEBUG_OUTPUT
|
||||
using namespace date;
|
||||
cout << "[" << std::chrono::system_clock::now() << "]";
|
||||
cout << "[WriterManager::WriterManager] Writer manager for n_frames " << n_frames << endl;
|
||||
cout << "[WriterManager::WriterManager] Writer manager initialized." << endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -99,11 +98,6 @@ string WriterManager::get_status()
|
||||
}
|
||||
}
|
||||
|
||||
string WriterManager::get_output_file() const
|
||||
{
|
||||
return output_file;
|
||||
}
|
||||
|
||||
unordered_map<string, uint64_t> WriterManager::get_statistics() const
|
||||
{
|
||||
unordered_map<string, uint64_t> result = {{"n_received_frames", n_received_frames.load()},
|
||||
@@ -207,4 +201,4 @@ bool WriterManager::are_all_parameters_set()
|
||||
size_t WriterManager::get_n_frames()
|
||||
{
|
||||
return n_frames;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user