FairRoot/PandaRoot
PndMQExample1Sink.cxx
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence version 3 (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
15 #include <boost/thread.hpp>
16 #include <boost/bind.hpp>
17 #include <PndMQExample1Sink.h>
18 
19 #include "FairMQLogger.h"
20 
21 using namespace std;
22 
24 {
25 }
26 
28 {
29  while (CheckCurrentState(RUNNING))
30  {
31  unique_ptr<FairMQMessage> msg(fTransportFactory->CreateMessage());
32 
33  if (fChannels.at("data-in").at(0).Receive(msg) > 0)
34  {
35  LOG(INFO) << "Received message: \""
36  << string(static_cast<char*>(msg->GetData()), msg->GetSize())
37  << "\"";
38  }
39  }
40 }
41 
43 {
44 }