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