Skip to content

Commit 08b53c9

Browse files
rbxsawenzel
authored andcommitted
Remove outdated factory calls
1 parent 852fb56 commit 08b53c9

6 files changed

Lines changed: 11 additions & 33 deletions

File tree

Utilities/QC/QCMerger/src/MergerDevice.cxx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include <boost/algorithm/string.hpp>
77

88
#include <FairMQLogger.h>
9-
#include <zeromq/FairMQTransportFactoryZMQ.h>
109

1110
#include <dds_intercom.h>
1211

@@ -21,7 +20,7 @@ using namespace dds::intercom_api;
2120

2221
MergerDevice::MergerDevice(unique_ptr<Merger> merger, string mergerId, int numIoThreads) : mMerger(move(merger)), ddsCustomCmd(new CCustomCmd(mService))
2322
{
24-
this->SetTransport(new FairMQTransportFactoryZMQ);
23+
this->SetTransport("zeromq");
2524
this->SetProperty(Id, mergerId);
2625
this->SetProperty(NumIoThreads, numIoThreads);
2726

Utilities/QC/QCMerger/src/runMerger.cxx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
#include <TApplication.h>
1010
#include <FairMQLogger.h>
11-
#include <zeromq/FairMQTransportFactoryZMQ.h>
1211

1312
#include <boost/program_options/parsers.hpp>
1413
#include <boost/program_options/variables_map.hpp>

Utilities/QC/QCProducer/src/ProducerDevice.cxx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
#include <TMessage.h>
1010
#include <FairMQLogger.h>
11-
#include <zeromq/FairMQTransportFactoryZMQ.h>
1211

1312
#include "QCProducer/ProducerDevice.h"
1413

@@ -18,7 +17,7 @@ using namespace dds::intercom_api;
1817

1918
ProducerDevice::ProducerDevice(const char * producerId, const int numIoThreads, shared_ptr<Producer> & producer) : ddsCustomCmd(new CCustomCmd(mService))
2019
{
21-
this->SetTransport(new FairMQTransportFactoryZMQ);
20+
this->SetTransport("zeromq");
2221
this->SetProperty(Id, producerId);
2322
this->SetProperty(NumIoThreads, numIoThreads);
2423
mProducer = producer;

Utilities/QC/QCViewer/src/ViewerDevice.cxx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
#include <TSystem.h>
66
#include <FairMQLogger.h>
7-
#include <zeromq/FairMQTransportFactoryZMQ.h>
87

98
#include "QCViewer/ViewerDevice.h"
109
#include "QCCommon/TMessageWrapper.h"
@@ -13,7 +12,7 @@ using namespace std;
1312

1413
ViewerDevice::ViewerDevice(std::string viewerId, int numIoThreads, string drawingOptions)
1514
{
16-
this->SetTransport(new FairMQTransportFactoryZMQ);
15+
this->SetTransport("zeromq");
1716
this->SetProperty(ViewerDevice::Id, viewerId);
1817
this->SetProperty(ViewerDevice::NumIoThreads, numIoThreads);
1918
mDrawingOptions = drawingOptions;

Utilities/aliceHLTwrapper/src/aliceHLTEventSampler.cxx

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@
1717

1818
#include "aliceHLTwrapper/EventSampler.h"
1919
#include <getopt.h>
20-
#ifdef NANOMSG
21-
#include <nanomsg/FairMQTransportFactoryNN.h>
22-
#endif
23-
#include <zeromq/FairMQTransportFactoryZMQ.h>
2420
#include <tools/FairMQTools.h>
2521

2622
#include <FairMQStateMachine.h>
@@ -309,16 +305,11 @@ int main(int argc, char** argv)
309305
return 0;
310306
}
311307

312-
FairMQTransportFactory* transportFactory = nullptr;
308+
std::string transport;
313309
if (strcmp(factoryType, "nanomsg") == 0) {
314-
#ifdef NANOMSG
315-
transportFactory = new FairMQTransportFactoryNN();
316-
#else
317-
cerr << "can not create factory for NANOMSG: not enabled in build" << endl;
318-
return -ENODEV;
319-
#endif
310+
transport = "nanomsg";
320311
} else if (strcmp(factoryType, "zmq") == 0) {
321-
transportFactory = new FairMQTransportFactoryZMQ();
312+
transport = "zeromq";
322313
} else {
323314
cerr << "invalid factory type: " << factoryType << endl;
324315
return -ENODEV;
@@ -338,7 +329,7 @@ int main(int argc, char** argv)
338329
{ // scope for the device reference variable
339330
FairMQDevice& device = *gDevice;
340331

341-
device.SetTransport(transportFactory);
332+
device.SetTransport(transport);
342333
device.SetProperty(FairMQDevice::Id, id.c_str());
343334
device.SetProperty(FairMQDevice::NumIoThreads, numIoThreads);
344335
// device.SetProperty(FairMQDevice::LogIntervalInMs, deviceLogInterval);

Utilities/aliceHLTwrapper/src/aliceHLTWrapper.cxx

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@
2222
#include <cstring>
2323
#include <sstream>
2424
#include <cerrno>
25-
#ifdef NANOMSG
26-
#include <nanomsg/FairMQTransportFactoryNN.h>
27-
#endif
28-
#include <zeromq/FairMQTransportFactoryZMQ.h>
2925
#include <tools/FairMQTools.h>
3026

3127
#include <FairMQStateMachine.h>
@@ -333,16 +329,11 @@ int main(int argc, char** argv)
333329
return 0;
334330
}
335331

336-
FairMQTransportFactory* transportFactory = nullptr;
332+
std::string transport;
337333
if (strcmp(factoryType, "nanomsg") == 0) {
338-
#ifdef NANOMSG
339-
transportFactory = new FairMQTransportFactoryNN();
340-
#else
341-
cerr << "can not create factory for NANOMSG: not enabled in build" << endl;
342-
return -ENODEV;
343-
#endif
334+
transport = "nanomsg";
344335
} else if (strcmp(factoryType, "zmq") == 0) {
345-
transportFactory = new FairMQTransportFactoryZMQ();
336+
transport = "zeromq";
346337
} else {
347338
cerr << "invalid factory type: " << factoryType << endl;
348339
return -ENODEV;
@@ -373,7 +364,7 @@ int main(int argc, char** argv)
373364
{ // scope for the device reference variable
374365
FairMQDevice& device = *gDevice;
375366

376-
device.SetTransport(transportFactory);
367+
device.SetTransport(transport);
377368
device.SetProperty(FairMQDevice::Id, id.c_str());
378369
device.SetProperty(FairMQDevice::NumIoThreads, numIoThreads);
379370
// device.SetProperty(FairMQDevice::LogIntervalInMs, deviceLogInterval);

0 commit comments

Comments
 (0)