FairMQ/fairmq/FairMQSink.cxx
Alexey Rybalchenko d14d96ea70 fix CID 10112
fix CIDs 10922, 10921

fix CIDs 10369, 10371, 10372, 10373, 10374

fix CID 10406

fix CID 10414

fix CIDs 10850-52, 10857, 10859-60, 10863, 10869-76

fix CIDs 10014 10080
2014-07-04 13:24:44 +02:00

49 lines
1.2 KiB
C++

/********************************************************************************
* Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence version 3 (LGPL) version 3, *
* copied verbatim in the file "LICENSE" *
********************************************************************************/
/**
* FairMQSink.cxx
*
* @since 2013-01-09
* @author D. Klein, A. Rybalchenko
*/
#include <boost/thread.hpp>
#include <boost/bind.hpp>
#include "FairMQSink.h"
#include "FairMQLogger.h"
FairMQSink::FairMQSink()
{
}
void FairMQSink::Run()
{
LOG(INFO) << ">>>>>>> Run <<<<<<<";
boost::thread rateLogger(boost::bind(&FairMQDevice::LogSocketRates, this));
size_t bytes_received = 0;
while (fState == RUNNING)
{
FairMQMessage* msg = fTransportFactory->CreateMessage();
bytes_received = fPayloadInputs->at(0)->Receive(msg);
delete msg;
}
rateLogger.interrupt();
rateLogger.join();
}
FairMQSink::~FairMQSink()
{
}