#ifndef __JDAQUTCEXTENDED_IO__ #define __JDAQUTCEXTENDED_IO__ #include "km3net-dataformat/online/JDAQUTCExtended.hh" #include "JIO/JSerialisable.hh" /** * \author mdejong */ namespace KM3NETDAQ { /** * Get size of type. * * \return number of bytes */ template<> inline size_t getSizeof() { return (sizeof(JDAQUTCExtended::UTC_seconds) + sizeof(JDAQUTCExtended::UTC_16nanosecondcycles)); } /** * Read UTC from input. * * \param in reader * \param utc UTC * \return reader */ inline JReader& operator>>(JReader& in, JDAQUTCExtended& utc) { in >> utc.UTC_seconds; in >> utc.UTC_16nanosecondcycles; return in; } /** * Write UTC to output. * * \param out writer * \param utc UTC * \return writer */ inline JWriter& operator<<(JWriter& out, const JDAQUTCExtended& utc) { out << utc.UTC_seconds; out << utc.UTC_16nanosecondcycles; return out; } } #endif