#ifndef __JDETECTOR__JHYDROPHONE__ #define __JDETECTOR__JHYDROPHONE__ #include #include #include #include "JDetector/JLocation.hh" #include "JGeometry3D/JPosition3D.hh" /** * \file * * Data structure for hydrophone. * \author mdejong */ namespace JDETECTOR {} namespace JPP { using namespace JDETECTOR; } namespace JDETECTOR { using JGEOMETRY3D::JPosition3D; /** * Type definition of hydrophone. * * The position of the hydrophone is defined with respect to the position of the top of the T-bar. */ struct JHydrophone : public JLocation, public JPosition3D { /** * Default constructor. */ JHydrophone() : JLocation (), JPosition3D() {} /** * Constructor. * * \param location location * \param position position */ JHydrophone(const JLocation location, const JPosition3D& position) : JLocation (location), JPosition3D(position) {} /** * Read hydrophone from input. * * \param in input stream * \param hydrophone hydrophone * \return input stream */ friend inline std::istream& operator>>(std::istream& in, JHydrophone& hydrophone) { in >> static_cast (hydrophone); in >> static_cast(hydrophone); return in; } /** * Write hydrophone to output. * * \param out output stream * \param hydrophone hydrophone * \return output stream */ friend inline std::ostream& operator<<(std::ostream& out, const JHydrophone& hydrophone) { out << static_cast (hydrophone); out << ' '; out << static_cast(hydrophone); return out; } }; } #endif