Jpp 19.3.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
JHydrophone.hh
Go to the documentation of this file.
1#ifndef __JDETECTOR__JHYDROPHONE__
2#define __JDETECTOR__JHYDROPHONE__
3
4#include <istream>
5#include <ostream>
6#include <iomanip>
7
10
11
12/**
13 * \file
14 *
15 * Data structure for hydrophone.
16 * \author mdejong
17 */
18namespace JDETECTOR {}
19namespace JPP { using namespace JDETECTOR; }
20
21namespace JDETECTOR {
22
24
25 /**
26 * Type definition of hydrophone.
27 *
28 * The position of the hydrophone is defined with respect to the position of the top of the T-bar.
29 */
30 struct JHydrophone :
31 public JLocation,
32 public JPosition3D
33 {
34 /**
35 * Default constructor.
36 */
38 JLocation (),
40 {}
41
42
43 /**
44 * Constructor.
45 *
46 * \param location location
47 * \param position position
48 */
49 JHydrophone(const JLocation location,
50 const JPosition3D& position) :
51 JLocation (location),
52 JPosition3D(position)
53 {}
54
55
56 /**
57 * Read hydrophone from input.
58 *
59 * \param in input stream
60 * \param hydrophone hydrophone
61 * \return input stream
62 */
63 friend inline std::istream& operator>>(std::istream& in, JHydrophone& hydrophone)
64 {
65 in >> static_cast<JLocation&> (hydrophone);
66 in >> static_cast<JPosition3D&>(hydrophone);
67
68 return in;
69 }
70
71
72 /**
73 * Write hydrophone to output.
74 *
75 * \param out output stream
76 * \param hydrophone hydrophone
77 * \return output stream
78 */
79 friend inline std::ostream& operator<<(std::ostream& out, const JHydrophone& hydrophone)
80 {
81 out << static_cast<const JLocation&> (hydrophone);
82 out << ' ';
83 out << static_cast<const JPosition3D&>(hydrophone);
84
85 return out;
86 }
87 };
88}
89
90#endif
Logical location of module.
Logical location of module.
Definition JLocation.hh:40
Data structure for position in three dimensions.
file Auxiliary data structures and methods for detector calibration.
Definition JAnchor.hh:12
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Type definition of hydrophone.
friend std::ostream & operator<<(std::ostream &out, const JHydrophone &hydrophone)
Write hydrophone to output.
JHydrophone(const JLocation location, const JPosition3D &position)
Constructor.
friend std::istream & operator>>(std::istream &in, JHydrophone &hydrophone)
Read hydrophone from input.
JHydrophone()
Default constructor.