Skip to content

Commit 4f278ef

Browse files
committed
build without zmq
1 parent 0d6c839 commit 4f278ef

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/ReadoutStats.cxx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ ReadoutStats::~ReadoutStats() {
4444
publishThread->join();
4545
publishThread = nullptr;
4646
}
47+
#ifdef WITH_ZMQ
4748
zmqCleanup();
49+
#endif
4850
}
4951

5052
void ReadoutStats::reset(bool lightReset)
@@ -93,9 +95,8 @@ uint64_t stringToUint64(const char* in)
9395

9496
int ReadoutStats::startPublish(const std::string &cfgZmqPublishAddress, double cfgZmqPublishInterval) {
9597

96-
if (zmqEnabled) return __LINE__;
97-
9898
#ifdef WITH_ZMQ
99+
if (zmqEnabled) return __LINE__;
99100

100101
// default ZMQ settings for data monitoring
101102
int cfg_ZMQ_CONFLATE = 0; // buffer last message only
@@ -157,6 +158,9 @@ int ReadoutStats::startPublish(const std::string &cfgZmqPublishAddress, double c
157158
} else {
158159
return -1; //disabled
159160
}
161+
#else
162+
(void)cfgZmqPublishAddress;
163+
(void)cfgZmqPublishInterval;
160164
#endif
161165

162166
publishNow();
@@ -182,7 +186,9 @@ void ReadoutStats::zmqCleanup() {
182186

183187
int ReadoutStats::stopPublish() {
184188
publishNow();
189+
#ifdef WITH_ZMQ
185190
zmqCleanup();
191+
#endif
186192
return 0;
187193
}
188194

0 commit comments

Comments
 (0)