Jpp
18.0.1-rc.1
the software that should make you happy
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
software
JAcoustics
JPrintHydrophone.cc
Go to the documentation of this file.
1
#include <iostream>
2
#include <iomanip>
3
4
#include "
JDetector/JHydrophone.hh
"
5
6
#include "
JSupport/JMeta.hh
"
7
8
#include "
Jeep/JContainer.hh
"
9
#include "
Jeep/JPrint.hh
"
10
#include "
Jeep/JParser.hh
"
11
#include "
Jeep/JMessage.hh
"
12
13
14
/**
15
* \file
16
*
17
* Auxiliary program to print hydrophone configuration.
18
* \author mdejong
19
*/
20
int
main
(
int
argc,
char
**argv)
21
{
22
using namespace
std;
23
using namespace
JPP;
24
25
typedef
JContainer< vector<JHydrophone> > container_type;
26
27
string
file_name;
28
int
string
;
29
int
debug
;
30
31
try
{
32
33
JParser<>
zap(
"Auxiliary program to print hydrophone configuration."
);
34
35
zap[
'f'
] =
make_field
(file_name,
"hydrophone file"
);
36
zap[
'S'
] =
make_field
(
string
) = -1;
37
zap[
'd'
] =
make_field
(
debug
) = 1;
38
39
zap(argc, argv);
40
}
41
catch
(
const
exception &error) {
42
FATAL
(error.what() << endl);
43
}
44
45
container_type
data
;
46
47
data
.load(file_name.c_str());
48
49
if
(
string
!= 0) {
50
51
for
(
const
auto
& hydrophone :
data
) {
52
if
(hydrophone.getString() ==
string
||
string
== -1) {
53
cout << hydrophone << endl;
54
}
55
}
56
57
}
else
{
58
59
cout <<
data
<< endl;
60
}
61
}
JPARSER::JParser
Utility class to parse command line options.
Definition:
JParser.hh:1514
main
int main(int argc, char *argv[])
Definition:
Main.cc:15
JHydrophone.hh
Data structure for hydrophone.
JPrint.hh
I/O formatting auxiliaries.
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition:
JParser.hh:1989
JMeta.hh
ROOT I/O of application specific meta data.
string
then awk string
Definition:
pre-calibration.sh:45
JMessage.hh
General purpose messaging.
FATAL
#define FATAL(A)
Definition:
JMessage.hh:67
JParser.hh
Utility class to parse command line options.
applications.data
tuple data
Definition:
applications.py:8
JContainer.hh
Container I/O.
debug
int debug
debug level
Definition:
archive-put-wiki-detectors.sh:92
Generated by
1.8.5