1 #ifndef EUDAQ_INCLUDED_EUDRBEvent
2 #define EUDAQ_INCLUDED_EUDRBEvent
6 #include "eudaq/DetectorEvent.hh"
12 typedef std::vector<unsigned char> vec_t;
22 unsigned GetID()
const {
return m_id; }
30 const vec_t &GetDataVector()
const {
return m_data; }
31 void Print(std::ostream &)
const;
36 static vec_t make_vector(
const T *data,
size_t bytes) {
37 const unsigned char *ptr =
reinterpret_cast<const unsigned char *
>(data);
38 return vec_t(ptr, ptr + bytes);
40 template <
typename T>
static vec_t make_vector(
const std::vector<T> &data) {
41 const unsigned char *ptr =
42 reinterpret_cast<const unsigned char *
>(&data[0]);
43 return vec_t(ptr, ptr + data.size() *
sizeof(T));
49 inline std::ostream &operator<<(std::ostream &os,
const EUDRBBoard &fr) {
83 virtual void Print(std::ostream &)
const;
87 unsigned NumBoards()
const {
return m_boards.size(); }
88 EUDRBBoard &GetBoard(
unsigned i) {
return m_boards[i]; }
89 const EUDRBBoard &GetBoard(
unsigned i)
const {
return m_boards[i]; }
104 std::vector<EUDRBBoard> m_boards;
160 #endif // EUDAQ_INCLUDED_EUDRBEvent
Definition: EUDRBEvent.hh:57
Definition: Serializer.hh:156
Definition: Serializable.hh:13
Definition: EUDRBEvent.hh:10
Definition: Serializer.hh:19