use factory for messages

This commit is contained in:
Alexey Rybalchenko
2014-01-21 16:41:07 +01:00
parent 88fee245b8
commit 5989845e31
16 changed files with 36 additions and 17 deletions

View File

@@ -45,6 +45,7 @@ void FairMQSampler::Init()
FairMQDevice::Init();
fSamplerTask->SetBranch(fBranch);
fSamplerTask->SetTransport(fTransportFactory); // TODO: simplify message creation for sampler task?
fFairRunAna->SetInputFile(TString(fInputFile));
TString output = fInputFile;
@@ -139,7 +140,7 @@ void FairMQSampler::ListenToCommands()
while ( true ) {
try {
FairMQMessage* msg = new FairMQMessageZMQ();
FairMQMessage* msg = fTransportFactory->CreateMessage();
received = fPayloadInputs->at(0)->Receive(msg);