#ifndef __JDAQFRAMESTATUS_IO__ #define __JDAQFRAMESTATUS_IO__ #include "km3net-dataformat/online/JDAQFrameStatus.hh" #include "JIO/JSerialisable.hh" /** * \author mdejong */ namespace KM3NETDAQ { /** * Get size of type. * * \return number of bytes */ template<> inline size_t getSizeof() { return (sizeof(JDAQFrameStatus::daq) + sizeof(JDAQFrameStatus::status) + sizeof(JDAQFrameStatus::fifo) + sizeof(JDAQFrameStatus::status_3) + sizeof(JDAQFrameStatus::status_4)); } /** * Read DAQ frame status from input. * * \param in reader * \param status DAQ frame status * \return reader */ inline JReader& operator>>(JReader& in, JDAQFrameStatus& status) { in >> status.daq; in >> status.status; in >> status.fifo; in >> status.status_3; in >> status.status_4; return in; } /** * Write DAQ frame status to output. * * \param out writer * \param status DAQ frame status * \return writer */ inline JWriter& operator<<(JWriter& out, const JDAQFrameStatus& status) { out << status.daq; out << status.status; out << status.fifo; out << status.status_3; out << status.status_4; return out; } } #endif