#ifndef __JDAQCHRONOMETER_IO__ #define __JDAQCHRONOMETER_IO__ #include "km3net-dataformat/online/JDAQChronometer.hh" #include "JIO/JSerialisable.hh" #include "JDAQ/JDAQUTCExtendedIO.hh" /** * \author mdejong */ namespace KM3NETDAQ { /** * Get size of type. * * \return number of bytes */ template<> inline size_t getSizeof() { return (sizeof(JDAQChronometer::detector_id) + sizeof(JDAQChronometer::run) + sizeof(JDAQChronometer::frame_index) + getSizeof()); } /** * Read DAQ chronometer from input. * * \param in reader * \param chronometer DAQ chronometer * \return reader */ inline JReader& operator>>(JReader& in, JDAQChronometer& chronometer) { in >> chronometer.detector_id; in >> chronometer.run; in >> chronometer.frame_index; in >> chronometer.timeslice_start; return in; } /** * Write DAQ chronometer to output. * * \param out writer * \param chronometer DAQ chronometer * \return writer */ inline JWriter& operator<<(JWriter& out, const JDAQChronometer& chronometer) { out << chronometer.detector_id; out << chronometer.run; out << chronometer.frame_index; out << chronometer.timeslice_start; return out; } } #endif