mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-06-04 11:48:42 +02:00
Add debug output to BufferUtils
This commit is contained in:
+3
-1
@@ -7,8 +7,10 @@ set (SF_DAQ_BUFFER_VERSION "1.0.0")
|
||||
|
||||
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
|
||||
# Download and unpack googletest at configure time
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DMY_DEBUG")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG_OUTPUT")
|
||||
|
||||
# Download and unpack googletest at configure time
|
||||
configure_file(googletest.in googletest-download/CMakeLists.txt)
|
||||
|
||||
execute_process(
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <rapidjson/istreamwrapper.h>
|
||||
#include <rapidjson/document.h>
|
||||
#include <rapidjson/stringbuffer.h>
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
using namespace buffer_config;
|
||||
@@ -92,6 +93,10 @@ void* BufferUtils::connect_socket(
|
||||
string ipc_address = BUFFER_LIVE_IPC_URL +
|
||||
detector_name + "-" +
|
||||
stream_name;
|
||||
#ifdef DEBUG_OUTPUT
|
||||
cout << "[BufferUtils::connect_socket]";
|
||||
cout << " IPC address: " << ipc_address << endl;
|
||||
#endif
|
||||
|
||||
void* socket = zmq_socket(ctx, ZMQ_SUB);
|
||||
if (socket == nullptr) {
|
||||
|
||||
Reference in New Issue
Block a user