artdaq_mfextensions  v1_03_05
LogReader_receiver.hh
1 #ifndef MF_LOG_READER_H
2 #define MF_LOG_READER_H
3 
4 #include <fstream>
5 #include <string>
6 
7 #include "fhiclcpp/fwd.h"
8 #include "messagefacility/MessageLogger/MessageLogger.h"
9 
10 #include <boost/regex.hpp>
11 
12 #include "mfextensions/Receivers/MVReceiver.hh"
13 
14 namespace mfviewer {
20 class LogReader : public MVReceiver {
21  Q_OBJECT
22  public:
27  explicit LogReader(fhicl::ParameterSet pset);
28 
32  virtual ~LogReader();
33 
37  void run();
38 
43  qt_mf_msg read_next(); // read next log
44 
45  private:
46  std::ifstream log_;
47  size_t pos_;
48 
49  std::string filename_;
50  int counter_;
51 
52  boost::regex metadata_1;
53  // boost::regex metadata_2;
54  boost::smatch what_;
55 };
56 } // namespace mfviewer
57 
58 #endif
LogReader(fhicl::ParameterSet pset)
LogReader Constructor
qt_mf_msg read_next()
Read the next message from the input stream
virtual ~LogReader()
LogReader Destructor
Qt wrapper around MessageFacility message
Definition: qt_mf_msg.hh:30
void run()
Receiver loop method. Reads messages from file and emits newMessage signal
MessageFacility Log Reader Read messagefacility log archive and reemit as messagefacility messages ...
A MVReceiver class listens for messages and raises a signal when one arrives
Definition: MVReceiver.hh:17