mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-04-27 12:44:51 +02:00
Add debug output to ProcessManager
This commit is contained in:
@@ -21,7 +21,6 @@ void ProcessManager::start_rest_api(const uint16_t rest_port)
|
||||
// In case SIGINT stopped the rest_api.
|
||||
// writer_manager.stop();
|
||||
|
||||
|
||||
#ifdef DEBUG_OUTPUT
|
||||
using namespace date;
|
||||
using namespace chrono;
|
||||
@@ -36,12 +35,30 @@ void ProcessManager::start_writing(
|
||||
const int n_frames,
|
||||
const int user_id)
|
||||
{
|
||||
recv_module_.start_saving();
|
||||
#ifdef DEBUG_OUTPUT
|
||||
using namespace date;
|
||||
using namespace chrono;
|
||||
cout << "[" << system_clock::now() << "]";
|
||||
cout << "[ProcessManager::start_writing]";
|
||||
cout << " output_file " << output_file;
|
||||
cout << " n_frames " << n_frames;
|
||||
cout << " user_id " << user_id << endl;
|
||||
#endif
|
||||
|
||||
// TODO: Empty buffer to have a clean slate.
|
||||
write_module_.start_writing(output_file, n_frames, user_id);
|
||||
recv_module_.start_saving();
|
||||
}
|
||||
|
||||
void ProcessManager::stop_writing()
|
||||
{
|
||||
#ifdef DEBUG_OUTPUT
|
||||
using namespace date;
|
||||
using namespace chrono;
|
||||
cout << "[" << system_clock::now() << "]";
|
||||
cout << "[ProcessManager::stop_writing]" << endl;
|
||||
#endif
|
||||
|
||||
recv_module_.stop_saving();
|
||||
write_module_.stop_writing();
|
||||
}
|
||||
@@ -50,6 +67,15 @@ void ProcessManager::start_receiving(
|
||||
const string& connect_address,
|
||||
const int n_receiving_threads)
|
||||
{
|
||||
#ifdef DEBUG_OUTPUT
|
||||
using namespace date;
|
||||
using namespace chrono;
|
||||
cout << "[" << system_clock::now() << "]";
|
||||
cout << "[ProcessManager::start_receiving]" << endl;
|
||||
cout << " connect_address " << connect_address;
|
||||
cout << " n_receiving_threads " << n_receiving_threads;
|
||||
#endif
|
||||
|
||||
recv_module_.start_recv(
|
||||
connect_address,
|
||||
static_cast<uint8_t>(n_receiving_threads));
|
||||
@@ -57,5 +83,12 @@ void ProcessManager::start_receiving(
|
||||
|
||||
void ProcessManager::stop_receiving()
|
||||
{
|
||||
#ifdef DEBUG_OUTPUT
|
||||
using namespace date;
|
||||
using namespace chrono;
|
||||
cout << "[" << system_clock::now() << "]";
|
||||
cout << "[ProcessManager::stop_receiving]" << endl;
|
||||
#endif
|
||||
|
||||
recv_module_.stop_recv();
|
||||
}
|
||||
Reference in New Issue
Block a user