Add debug output to BufferUtils

This commit is contained in:
2021-04-14 11:59:56 +02:00
parent dfcb968e4b
commit 246d5e7dde
2 changed files with 8 additions and 1 deletions
+3 -1
View File
@@ -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(
+5
View File
@@ -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) {