#ifndef __JDAQKEYHIT__ #define __JDAQKEYHIT__ #include "JIO/JSerialisable.hh" #include "JDAQ/JDAQRoot.hh" #include "JDAQ/JDAQModuleIdentifier.hh" #include "JDAQ/JDAQHit.hh" namespace KM3NETDAQ { namespace { using JIO::JReader; using JIO::JWriter; } /** * DAQ key hit */ class JDAQKeyHit : public JDAQModuleIdentifier, public JDAQHit { public: /** * Default constructor. */ JDAQKeyHit() : JDAQModuleIdentifier(), JDAQHit() {} /** * Constructor. * * \param moduleID Module identifier * \param hit PMT hit */ JDAQKeyHit(const JDAQModuleIdentifier& moduleID, const JDAQHit& hit) : JDAQModuleIdentifier(moduleID), JDAQHit(hit) {} /** * Virtual destructor. */ virtual ~JDAQKeyHit() {} /** * Read JDAQKeyHit from input. * * \param in JReader * \param hit JDAQKeyHit * \return JReader */ friend inline JReader& operator>>(JReader& in, JDAQKeyHit& hit) { in >> static_cast(hit); in >> static_cast (hit); return in; } /** * Write JDAQKeyHit to output. * * \param out JWriter * \param hit JDAQKeyHit * \return JWriter */ friend inline JWriter& operator<<(JWriter& out, const JDAQKeyHit& hit) { out << static_cast(hit); out << static_cast (hit); return out; } /** * Get size of object. * * \return number of bytes */ static int sizeOf() { return (JDAQModuleIdentifier::sizeOf() + JDAQHit ::sizeOf()); } ClassDef(JDAQKeyHit,1); }; } #endif