#ifndef __JDAQSUMMARYSLICE_IO__ #define __JDAQSUMMARYSLICE_IO__ #include "km3net-dataformat/online/JDAQSummaryslice.hh" #include "JIO/JSerialisable.hh" #include "JIO/JSTDIO.hh" #include "JDAQ/JDAQSizeof.hh" #include "JDAQ/JDAQPreambleIO.hh" #include "JDAQ/JDAQSummarysliceHeaderIO.hh" #include "JDAQ/JDAQSummaryFrameIO.hh" /** * \author mdejong */ namespace KM3NETDAQ { /** * Get size of object. * * \param object DAQ summary slice * \return number of bytes */ inline size_t getSizeof(const JDAQSummaryslice& object) { return (getSizeof() + sizeof(Version_t) + getSizeof() + getSizeof(static_cast&>(object))); } /** * Read DAQ summary slice from input. * * \param in reader * \param object DAQ summary slice * \return reader */ inline JReader& operator>>(JReader& in, JDAQSummaryslice& object) { Version_t version; object.clear(); in >> static_cast (object); in >> version; in >> static_cast (object); in >> static_cast&>(object); return in; } /** * Write DAQ summary slice to output. * * \param out writer * \param object DAQ summary slice * \return writer */ inline JWriter& operator<<(JWriter& out, const JDAQSummaryslice& object) { out << JDAQPreamble::getDAQPreamble(object); out << JDAQSummaryslice::Class_Version(); out << static_cast (object); out << static_cast&>(object); return out; } } #endif