EUDAQ
 All Classes Namespaces Files Functions Variables Pages
Monitor.hh
1 #ifndef EUDAQ_INCLUDED_Monitor
2 #define EUDAQ_INCLUDED_Monitor
3 
4 #include "eudaq/StandardEvent.hh"
5 #include "eudaq/CommandReceiver.hh"
6 #include "eudaq/FileReader.hh"
7 #include <string>
8 #include <memory>
9 using std::shared_ptr;
10 namespace eudaq {
11 
15  class DLLEXPORT Monitor : public CommandReceiver {
16  public:
22  Monitor(const std::string &name, const std::string &runcontrol,
23  const unsigned lim, const unsigned skip_,
24  const unsigned int skip_evts, const std::string &datafile = "");
25  virtual ~Monitor() {}
26 
27  bool ProcessEvent();
28  virtual void OnIdle();
29 
30  virtual void OnEvent(const StandardEvent & /*ev*/){};
31  virtual void OnBadEvent(shared_ptr<Event> /*ev*/) {}
32  virtual void OnStartRun(unsigned param);
33  virtual void OnStopRun();
34 
35  shared_ptr<DetectorEvent> LastBore() const { return m_lastbore; }
36 
37  protected:
38  unsigned m_run;
39  bool m_callstart;
40  shared_ptr<FileReader> m_reader;
41  shared_ptr<DetectorEvent> m_lastbore;
42  unsigned limit;
43  unsigned skip;
44  unsigned int skip_events_with_counter;
45  unsigned int counter_for_skipping;
46  };
47 }
48 
49 #endif // EUDAQ_INCLUDED_Monitor
Definition: CommandReceiver.hh:20
Definition: Monitor.hh:15
Definition: StandardEvent.hh:128