artdaq_mfextensions  v1_04_00
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 {
19  Q_OBJECT
20 
21 public:
26  explicit MVReceiver(fhicl::ParameterSet pset);
27 
31  virtual ~MVReceiver() {}
32 
36  void stop() { stopRequested_ = true; }
37 
38 protected:
43 signals:
49  void NewMessage(qt_mf_msg const& msg);
50 };
51 } // namespace mfviewer
52 
53 #endif // MVRECEIVER_H
Qt wrapper around MessageFacility message
Definition: qt_mf_msg.hh:36
virtual ~MVReceiver()
MVReceiver destructor
Definition: MVReceiver.hh:31
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:42
MVReceiver(fhicl::ParameterSet pset)
Construct a MVReceiver using the given ParameterSet
Definition: MVReceiver.cc:3
void stop()
Stop the MVReceiver thread
Definition: MVReceiver.hh:36