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