15 #include <boost/thread.hpp>
16 #include <boost/bind.hpp>
17 #include <boost/archive/binary_iarchive.hpp>
20 #include "baseMQtools.h"
22 #include "FairMQLogger.h"
23 #include "mrfdata_8b.h"
35 gSystem->ResetSignal(kSigInterrupt);
36 gSystem->ResetSignal(kSigTermination);
38 using namespace baseMQ::tools::resolve;
40 if (has_BoostSerialization<
PndSdsDigiTopix4,
void(boost::archive::binary_iarchive&,
const unsigned int)>::value == 1)
53 FairMQChannel& dataInChannel = fChannels.at(
"data-in").at(0);
56 TH2*
h2 =
new TH2D(
"h2",
"h2", 21, -0.5, 20.5, 33, -0.5, 32.5);
57 TCanvas *
c1 =
new TCanvas(
"c1",
"Dynamic Filling Example", 500, 100, 700, 500);
59 while (CheckCurrentState(RUNNING))
61 FairMQMessage* msg = fTransportFactory->CreateMessage();
63 if (dataInChannel.Receive(msg) > 0)
65 LOG(INFO) <<
"Received Message: ";
66 LOG(INFO) << receivedMsgs++;
67 LOG(INFO) << msg->GetSize();
69 string msgStr(static_cast<char*>(msg->GetData()), msg->GetSize());
70 istringstream ibuffer(msgStr);
72 boost::archive::binary_iarchive InputArchive(ibuffer);
77 catch (boost::archive::archive_exception& e)
79 LOG(ERROR) << e.what();
82 LOG(INFO) <<
"TopixData: " <<
fTopixData.size();
86 h2->Fill(itr.GetPixelColumn(), itr.GetPixelRow());
91 const int kUPDATE = 100;
93 if (receivedMsgs == kUPDATE) h2->Draw(
"colz");
virtual ~PndMQTopix4OnlineHisto()
Data class to store the digi output of a pixel module.
bool fHasBoostSerialization
std::vector< PndSdsDigiTopix4 > fTopixData