Jpp
17.1.0
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
JMergeTripod.cc
Go to the documentation of this file.
1
#include <iostream>
2
#include <iomanip>
3
#include <vector>
4
5
#include "
JDetector/JTripod.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
* \file
16
*
17
* Auxiliary program to merge tripod files.
18
*
19
* \author mdejong
20
*/
21
int
main
(
int
argc,
char
**argv)
22
{
23
using namespace
std;
24
using namespace
JPP;
25
26
typedef
JContainer< vector<JTripod> > container_type;
27
28
vector<string>
inputFile;
29
string
outputFile
;
30
int
debug
;
31
32
try
{
33
34
JParser<>
zap(
"Auxiliary program to merge tripod files."
);
35
36
zap[
'f'
] =
make_field
(inputFile,
"input file"
);
37
zap[
'o'
] =
make_field
(
outputFile
,
"output file"
);
38
zap[
'd'
] =
make_field
(
debug
) = 1;
39
40
zap(argc, argv);
41
}
42
catch
(
const
exception &error) {
43
FATAL
(error.what() << endl);
44
}
45
46
container_type
tripods
;
47
48
tripods
.comment.add(JMeta(argc, argv));
49
50
for
(
vector<string>::const_iterator
i = inputFile.begin(); i != inputFile.end(); ++i) {
51
52
container_type buffer;
53
54
try
{
55
load
(*i, buffer);
56
}
57
catch
(
const
JException& error) {
58
FATAL
(error);
59
}
60
61
if
(
tripods
.empty())
62
tripods
= buffer;
63
else
64
copy
(buffer.begin(), buffer.end(), back_inserter(
tripods
));
65
}
66
67
tripods
.store(
outputFile
.c_str());
68
}
JPARSER::JParser
Utility class to parse command line options.
Definition:
JParser.hh:1500
main
int main(int argc, char *argv[])
Definition:
Main.cc:15
tripods
then fatal Number of tripods
Definition:
JFootprint.sh:45
outputFile
string outputFile
Definition:
JDAQTimesliceSelector.cc:37
std::vector
Definition:
JSTDTypes.hh:12
JPrint.hh
I/O formatting auxiliaries.
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition:
JParser.hh:1961
JMeta.hh
ROOT I/O of application specific meta data.
debug
int debug
debug level
Definition:
JSirene.cc:67
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:478
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:139
JTripod.hh
Data structure for tripod.
JContainer.hh
Container I/O.
Generated by
1.8.5