#ifndef __JDETECTOR__JPMTREADOUTADDRESS__ #define __JDETECTOR__JPMTREADOUTADDRESS__ #include #include #include "JIO/JSerialisable.hh" /** * \author mdejong */ namespace JDETECTOR {} namespace JPP { using namespace JDETECTOR; } namespace JDETECTOR { using JIO::JReader; using JIO::JWriter; /** * Data structure for PMT readout address. */ class JPMTReadoutAddress { public: /** * Default constructor. */ JPMTReadoutAddress() { this->tdc = -1; } /** * Constructor. * * \param tdc TDC */ JPMTReadoutAddress(const int tdc) { this->tdc = tdc; } /** * Get TDC. * * \return TDC */ int getTDC() const { return tdc; } /** * Read PMT readout address from input. * * \param in input stream * \param object PMT readout address * \return input stream */ friend inline std::istream& operator>>(std::istream& in, JPMTReadoutAddress& object) { return in >> object.tdc; } /** * Write PMT readout address to output. * * \param out output stream * \param object PMT readout address * \return output stream */ friend inline std::ostream& operator<<(std::ostream& out, const JPMTReadoutAddress& object) { return out << object.tdc; } /** * Read PMT readout address from input. * * \param in reader * \param object PMT readout address * \return reader */ friend inline JReader& operator>>(JReader& in, JPMTReadoutAddress& object) { return in >> object.tdc; } /** * Write PMT readout address to output. * * \param out writer * \param object PMT readout address * \return writer */ friend inline JWriter& operator<<(JWriter& out, const JPMTReadoutAddress& object) { return out << object.tdc; } int tdc; //!< TDC channel }; } #endif