Jpp test-rotations-new
the software that should make you happy
Loading...
Searching...
No Matches
DFInterface.cc
Go to the documentation of this file.
1#include "DFInterface.hh"
2#include "log.hh"
3
4/**
5 * \author cpellegrino
6 */
7
9{
10 Frame frame;
11
12 while (isRunning())
13 {
14 // wait for and get data
15 m_farm.getFrame(frame);
16
17 if (frame.size()) {
18
20
21 #ifdef DEBUG_DAQ_HEADER
22 DAQHeaderPrinter const daq_head(frame.data());
23 LOG_DEBUG << "DFInterface: Got this from the queue " << daq_head;
24 #endif
25
26 if (!frame.getNItems())
27 {
28 DAQHeaderPrinter const daq_head(frame.data());
29 LOG_NOTICE << "DFInterface: No data to transmit: " << daq_head;
30 continue;
31 }
32
33 #ifdef DEBUG_FRAME_LENGHT
34 static unsigned int nframes = 0;
35 ++nframes;
36 if (!(nframes % 10000))
37 {
38 LOG_DEBUG << "DFInterface: FrameLenght(): " << frame.getFrameLength();
39 }
40 #endif
41
42 m_recipients.send(frame);
43
46 }
47 }
48}
FrameFarm & m_farm
bool isRunning()
void operator()()
Definition DFInterface.cc:8
RecipientsHandler & m_recipients
void getFrame(Frame &frame)
Definition frame_farm.cc:36
Template Frame for ARS data.
Definition frame.hh:13
unsigned int getFrameLength() const
Definition frame.hh:34
unsigned int getNItems() const
Definition frame.hh:39
bool send(const Frame &data)
#define LOG_DEBUG
Definition log.hh:109
#define LOG_NOTICE
Definition log.hh:112
void chrono_set(chronometrable &chr)
void chrono_dump(const Frame &frame)