30{
33
34 const char*
const short_t =
"short";
35 const char*
const long_t =
"long";
36 const char*
const fft_t =
"fft";
37
41 string format;
42 double Tmax_s;
44
45 try {
46
47 JParser<> zap(
"Example program to print dynamic detector calibration.");
48
55
57 }
58 catch(const exception &error) {
60 }
61
62
64
65 try {
67 }
70 }
71
73
75
77
80 }
81
82 ostream os(buffer.is_open() ? &buffer :
cout.rdbuf());
83
85
86 comment.
add(
"documentation: https://common.pages.km3net.de/jpp/Position_calibration.PDF");
87
89 comment.
add(
"format: string number; UTC [s]; Tx; Ty");
91 comment.
add(
"format: https://indico.cern.ch/event/1014814/contributions/4259426/attachments/2201529/3724129/KM3NeT_position_file_format.pdf");
92 else if (format ==
fft_t)
93 comment.
add(
"format: <T>");
94
96
98
99
100
101
102
103
105
106 os << comment;
108
111 os <<
setw(4) <<
string->first <<
';'
112 <<
FIXED(20,5) << i->getX() <<
';'
113 <<
FIXED( 9,6) << i->getY().tx <<
';'
115 }
116 }
117 }
118
120
121 os << comment;
123
125
126 const double t1 = i->getX();
127
129
130 os <<
FIXED(20,5) << t1 <<
' '
131 <<
FIXED(20,5) << t1 <<
' '
133
135
136 os <<
setw(4) <<
module->getString() << ' '
137 << setw(2) << module->getFloor() << ' '
138 << setw(10) << module->getID() << endl;
139
140 os <<
FIXED(9,2) <<
module->getX() << ' '
141 << FIXED(9,2) << module->getY() << ' '
142 << FIXED(9,2) << module->getZ() << ' '
143 << FIXED(9,2) << -1.0 << ' '
144 << FIXED(9,2) << -1.0 << ' '
145 << FIXED(9,2) << -1.0 << endl;
146 }
147 }
148 }
149
150 if (format ==
fft_t) {
151
154
156 if (!string->second.empty()) {
157 xmin = min(xmin, string->second.getXmin());
158 xmax = max(xmax, string->second.getXmax());
159 }
160 }
161
162 for (
double x = xmin;
x <= xmax;
x += Tmax_s) {
163
165
167 if (!string->second.empty()) {
168 Q.
put(string->second(x).getLength());
169 }
170 }
171
173 }
174 }
175
176 buffer.close();
177}
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Template definition of a multi-dimensional oscillation probability interpolation table.
void load()
Load oscillation probability table.
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure for floating point format specification.
data_type::const_iterator const_iterator
Dynamic detector calibration.