#ifndef __JDAQEVENTHEADER_IO__ #define __JDAQEVENTHEADER_IO__ #include "km3net-dataformat/online/JDAQEventHeader.hh" #include "JIO/JSerialisable.hh" #include "JDAQ/JDAQHeaderIO.hh" #include "JDAQ/JDAQTriggerCounterIO.hh" #include "JDAQ/JDAQTriggerMaskIO.hh" /** * \author mdejong */ namespace KM3NETDAQ { /** * Get size of type. * * \return number of bytes */ template<> inline size_t getSizeof() { return (getSizeof() + getSizeof() + getSizeof() + sizeof(JDAQEventHeader::overlays)); } /** * Read DAQ event header from input. * * \param in reader * \param header DAQ event header * \return reader */ inline JReader& operator>>(JReader& in, JDAQEventHeader& header) { in >> static_cast (header); in >> static_cast(header); in >> static_cast (header); in >> header.overlays; return in; } /** * Write DAQ event header to output. * * \param out writer * \param header DAQ event header * \return writer */ inline JWriter& operator<<(JWriter& out, const JDAQEventHeader& header) { out << static_cast (header); out << static_cast(header); out << static_cast (header); out << header.overlays; return out; } } #endif