Jpp
18.6.0-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
JMergeHydrophone.cc
Go to the documentation of this file.
1
#include <iostream>
2
#include <iomanip>
3
#include <vector>
4
5
#include "
JDetector/JHydrophone.hh
"
6
7
#include "
JSupport/JMeta.hh
"
8
9
#include "
Jeep/JContainer.hh
"
10
#include "
Jeep/JPrint.hh
"
11
#include "
Jeep/JParser.hh
"
12
#include "
Jeep/JMessage.hh
"
13
14
15
/**
16
* \file
17
*
18
* Auxiliary program to merge hydrophone files.
19
*
20
* \author mdejong
21
*/
22
int
main
(
int
argc,
char
**argv)
23
{
24
using namespace
std;
25
using namespace
JPP;
26
27
typedef
JContainer< vector<JHydrophone> > container_type;
28
29
vector<string>
inputFile;
30
string
outputFile
;
31
int
debug
;
32
33
try
{
34
35
JParser<>
zap(
"Auxiliary program to merge hydrophone files."
);
36
37
zap[
'f'
] =
make_field
(inputFile,
"hydrophone input file"
);
38
zap[
'o'
] =
make_field
(
outputFile
,
"hydrophone output file"
);
39
zap[
'd'
] =
make_field
(
debug
,
"debug level"
) = 2;
40
41
zap(argc, argv);
42
}
43
catch
(
const
exception &error) {
44
FATAL
(error.what() << endl);
45
}
46
47
container_type
data
;
48
49
data
.comment.add(JMeta(argc, argv));
50
51
for
(
vector<string>::const_iterator
i
= inputFile.begin();
i
!= inputFile.end(); ++
i
) {
52
53
container_type buffer;
54
55
try
{
56
load
(*
i
, buffer);
57
}
58
catch
(
const
JException& error) {
59
FATAL
(error);
60
}
61
62
if
(
data
.empty())
63
data
= buffer;
64
else
65
copy
(buffer.begin(), buffer.end(), back_inserter(
data
));
66
}
67
68
data
.store(
outputFile
.c_str());
69
}
JPARSER::JParser
Utility class to parse command line options.
Definition:
JParser.hh:1711
main
int main(int argc, char *argv[])
Definition:
Main.cc:15
outputFile
string outputFile
Definition:
JDAQTimesliceSelector.cc:37
std::vector
Definition:
JSTDTypes.hh:13
JHydrophone.hh
Data structure for hydrophone.
i
then rm i
Definition:
JEvtReweightMupageParameterScan.sh:309
JPrint.hh
I/O formatting auxiliaries.
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition:
JParser.hh:2158
JMeta.hh
ROOT I/O of application specific meta data.
JMessage.hh
General purpose messaging.
FATAL
#define FATAL(A)
Definition:
JMessage.hh:67
JDETECTOR::load
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
Definition:
JDetectorToolkit.hh:484
JParser.hh
Utility class to parse command line options.
JAANET::copy
void copy(const Head &from, JHead &to)
Copy header from from to to.
Definition:
JHead.cc:162
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