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