1#ifndef PACKING_RAWDATAFILE_EVENTPACKET_H_
2#define PACKING_RAWDATAFILE_EVENTPACKET_H_
9#include "Packing/RawDataFile/SubsystemPacket.h"
12namespace rawdatafile {
25 const std::map<uint16_t, std::vector<uint32_t>>& unwrapped_subsys_data);
28 std::vector<uint32_t>
header()
const;
31 std::vector<uint32_t>
tail()
const;
33 const uint32_t& id()
const {
return id_; }
34 std::vector<SubsystemPacket>& data() {
return subsys_data_; }
52 uint16_t event_length_in_words_;
53 std::vector<SubsystemPacket> subsys_data_;
EventPacket()=default
default constructor for reading
std::vector< uint32_t > header() const
Get the header words.
utility::CRC & add(utility::CRC &c) const
add the event packet to the input crc
std::vector< uint32_t > tail() const
Get the tail words.
utility::Reader & read(utility::Reader &r)
read the event packet from the input reader
utility::Writer & write(utility::Writer &w) const
write the event packet to the input writer
The HGC ROC and FPGA use a CRC checksum to double check that the data transfer has been done correctl...