Fix CIDs 10587, 10813, 10911, 10912, 10402, 10403, 10577, 10578, 10579, 10848, 10861, 10865, 10868, 10910.

Move classes inheriting from device to a subdirectory.
Make sure only protobuf library installed by fairsoft is used.
Cleanup FairMQDevice and fix some initialization list warnings.
Loop to duplicate input files in Sampler.
Add some documentation to FairMQ.
This commit is contained in:
Alexey Rybalchenko
2014-07-21 15:15:40 +02:00
parent fe91e5af96
commit 281fcc459c
19 changed files with 183 additions and 159 deletions

View File

@@ -0,0 +1,52 @@
/********************************************************************************
* 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;
}
try {
rateLogger.interrupt();
rateLogger.join();
} catch(boost::thread_resource_error& e) {
LOG(ERROR) << e.what();
}
}
FairMQSink::~FairMQSink()
{
}