Jpp 21.0.0
the software that should make you happy
Loading...
Searching...
No Matches
JMechanics.hh
Go to the documentation of this file.
1#ifndef __JACOUSTICS__JMECHANICS__
2#define __JACOUSTICS__JMECHANICS__
3
4#include <istream>
5#include <ostream>
6#include <fstream>
7#include <iomanip>
8
10
11#include "Jeep/JComment.hh"
12
14
15
16
17/**
18 * \file
19 *
20 * Mechanical modelling of string.
21 * \author mdejong
22 */
23namespace JACOUSTICS {}
24namespace JPP { using namespace JACOUSTICS; }
25
26namespace JACOUSTICS {
27
28 using JEEP::JComment;
29
30
31 /**
32 * Auxiliary data structure for mechanical model parameters with commented data.
33 */
36 {
37 /**
38 * Read detector mechanics from input.
39 *
40 * \param in input stream
41 * \param object detector mechanics
42 * \return input stream
43 */
44 friend inline std::istream& operator>>(std::istream& in, JDetectorMechanics& object)
45 {
46 using namespace JPP;
47
48 JStringStream is(in);
49
50 object.clear();
51
52 is >> object.comment;
53
54 int string;
55 JMechanics mechanics;
56
57 while (is >> string >> mechanics) {
58 object[string] = mechanics;
59 }
60
61 return in;
62 }
63
64
65 /**
66 * Write detector mechanics to output.
67 *
68 * \param out output stream
69 * \param object detector mechanics
70 * \return output stream
71 */
72 friend inline std::ostream& operator<<(std::ostream& out, const JDetectorMechanics& object)
73 {
74 using namespace std;
75
76 out << object.comment;
77 out << static_cast<const JDetectorMechanics_t&>(object);
78
79 return out;
80 }
81
83 };
84}
85
86#endif
Mechanical modelling of string.
Wrapper class around STL stringstream class to facilitate optional loading of data from file.
Auxiliary classes and methods for acoustic position calibration.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure for mechanical model parameters of strings in a given detector.
Auxiliary data structure for mechanical model parameters with commented data.
Definition JMechanics.hh:36
friend std::istream & operator>>(std::istream &in, JDetectorMechanics &object)
Read detector mechanics from input.
Definition JMechanics.hh:44
friend std::ostream & operator<<(std::ostream &out, const JDetectorMechanics &object)
Write detector mechanics to output.
Definition JMechanics.hh:72
Auxiliary data structure for parameters of mechanical model.
Auxiliary class for comment.
Definition JComment.hh:43