mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 00:31:14 +00:00
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
49 lines
1.2 KiB
C++
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()
|
|
{
|
|
}
|