EUDAQ
 All Classes Namespaces Files Functions Variables Pages
StringEvent.hh
1 #ifndef EUDAQ_INCLUDED_StringEvent
2 #define EUDAQ_INCLUDED_StringEvent
3 
4 #include <vector>
5 #include "eudaq/Event.hh"
6 
7 namespace eudaq {
8 
12  class DLLEXPORT StringEvent : public Event {
13  EUDAQ_DECLARE_EVENT(StringEvent);
14 
15  public:
16  virtual void Serialize(Serializer &) const;
17  StringEvent(unsigned run, unsigned event, const std::string &str)
18  : Event(run, event), m_str(str) {}
20  virtual void Print(std::ostream &) const;
21 
23  virtual std::string GetType() const { return "StringEvent"; }
24 
25  static StringEvent BORE(unsigned run) { return StringEvent(run); }
26  static StringEvent EORE(unsigned run, unsigned event) {
27  return StringEvent(run, event);
28  }
29 
30  private:
31  StringEvent(unsigned run, unsigned event = 0)
32  : Event(run, event, NOTIMESTAMP,
33  event ? Event::FLAG_EORE : Event::FLAG_BORE) {}
34  std::string m_str;
35  };
36 }
37 
38 #endif // EUDAQ_INCLUDED_StringEvent
Definition: Serializer.hh:156
virtual std::string GetType() const
Return "StringEvent" as type.
Definition: StringEvent.hh:23
Definition: Serializer.hh:19
Definition: StringEvent.hh:12
Definition: Event.hh:38