artdaq_mfextensions  v1_03_03a
MVReceiver.hh
1 #ifndef MFVIEWER_MVRECEIVER_H
2 #define MFVIEWER_MVRECEIVER_H
3 
4 #include <string>
5 
6 #include "fhiclcpp/ParameterSet.h"
7 
8 #include "mfextensions/Receivers/qt_mf_msg.hh"
9 
10 #include <QtCore/QThread>
11 #include <iostream>
12 
13 namespace mfviewer {
17 class MVReceiver : public QThread {
18  Q_OBJECT
19 
20  public:
25  explicit MVReceiver(fhicl::ParameterSet pset);
26 
30  virtual ~MVReceiver() {}
31 
35  void stop() { stopRequested_ = true; }
36 
37  protected:
42  signals:
48  void NewMessage(qt_mf_msg const& msg);
49 };
50 } // namespace mfviewer
51 
52 #endif // MVRECEIVER_H
Qt wrapper around MessageFacility message
Definition: qt_mf_msg.hh:30
virtual ~MVReceiver()
MVReceiver destructor
Definition: MVReceiver.hh:30
void NewMessage(qt_mf_msg const &msg)
When a message is received by the MVReceiver, this signal should be raised so that the connected list...
A MVReceiver class listens for messages and raises a signal when one arrives
Definition: MVReceiver.hh:17
bool stopRequested_
Whether the MVRecevier should stop
Definition: MVReceiver.hh:41
MVReceiver(fhicl::ParameterSet pset)
Construct a MVReceiver using the given ParameterSet
Definition: MVReceiver.cc:3
void stop()
Stop the MVReceiver thread
Definition: MVReceiver.hh:35