use factory for sockets

This commit is contained in:
Alexey Rybalchenko
2014-01-21 15:57:59 +01:00
parent a383434c45
commit 88fee245b8
38 changed files with 653 additions and 493 deletions

View File

@@ -30,18 +30,20 @@ void FairMQSplitter::Run()
int direction = 0;
while ( fState == RUNNING ) {
FairMQMessage msg;
FairMQMessage* msg = new FairMQMessageZMQ();
received = fPayloadInputs->at(0)->Receive(&msg);
received = fPayloadInputs->at(0)->Receive(msg);
if (received) {
fPayloadOutputs->at(direction)->Send(&msg);
fPayloadOutputs->at(direction)->Send(msg);
direction++;
if (direction >= fNumOutputs) {
direction = 0;
}
received = false;
}
delete msg;
}
rateLogger.interrupt();