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