Jpp
18.2.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
JConvertAcoustics.cc
Go to the documentation of this file.
1
#include <iostream>
2
#include <iomanip>
3
#include <memory>
4
5
#include "TROOT.h"
6
#include "TFile.h"
7
8
#include "
JSupport/JMultipleFileScanner.hh
"
9
#include "
JSupport/JFileRecorder.hh
"
10
11
#include "
JAcoustics/JEvent.hh
"
12
#include "
JAcoustics/JEvt.hh
"
13
#include "
JAcoustics/JSuperEvt.hh
"
14
#include "
JAcoustics/JSupport.hh
"
15
16
#include "
JLang/JPipe.hh
"
17
#include "
JROOT/JROOTClassSelector.hh
"
18
19
#include "
Jeep/JParser.hh
"
20
#include "
Jeep/JMessage.hh
"
21
22
/**
23
* \file
24
*
25
* Auxiliary program to convert acoustic events.
26
* \author mdejong
27
*/
28
int
main
(
int
argc,
char
**argv)
29
{
30
using namespace
std;
31
using namespace
JPP;
32
33
typedef
JTYPELIST<JEvent, JEvt, JSuperEvt>::typelist
typelist;
34
35
JMultipleFileScanner<typelist>
inputFile;
36
JFileRecorder <typelist>
outputFile
;
37
JLimit_t
& numberOfEvents = inputFile.
getLimit
();
38
JROOTClassSelector
selector;
39
int
debug
;
40
41
try
{
42
43
JParser<>
zap(
"Auxiliary program to convert acoustic events."
);
44
45
zap[
'f'
] =
make_field
(inputFile);
46
zap[
'o'
] =
make_field
(
outputFile
);
47
zap[
'n'
] =
make_field
(numberOfEvents) = JLimit::max();
48
zap[
'C'
] =
make_field
(selector,
"name of data structure"
) = getROOTClassSelection<typelist>();
49
zap[
'd'
] =
make_field
(
debug
) = 1;
50
51
zap[
'C'
] =
JPARSER::not_initialised
();
52
53
zap(argc, argv);
54
}
55
catch
(
const
exception &error) {
56
FATAL
(error.what() << endl);
57
}
58
59
outputFile
.open();
60
61
inputFile |
JValve<typelist>
(selector) |
outputFile
;
62
63
outputFile
.close();
64
}
JSUPPORT::JFileRecorder
Object writing to file.
Definition:
JFileRecorder.hh:42
JPARSER::JParser
Utility class to parse command line options.
Definition:
JParser.hh:1514
main
int main(int argc, char *argv[])
Definition:
Main.cc:15
JSupport.hh
ROOT TTree parameter settings.
JROOT::JROOTClassSelector
Auxiliary class to select ROOT class based on class name.
Definition:
JROOTClassSelector.hh:32
JFileRecorder.hh
Recording of objects on file according a format that follows from the file name extension.
JEvent.hh
Acoustic event.
outputFile
string outputFile
Definition:
JDAQTimesliceSelector.cc:37
JLANG::JValve
Auxiliary class for selection of data type.
Definition:
JObjectIterator.hh:34
JLANG::JTypeList
Type list.
Definition:
JTypeList.hh:22
JSUPPORT::JLimit
Auxiliary class for defining the range of iterations of objects.
Definition:
JLimit.hh:41
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition:
JParser.hh:1989
JSuperEvt.hh
Acoustic event fit.
JPipe.hh
Implementation of pipe operation for object iterators.
JMessage.hh
General purpose messaging.
FATAL
#define FATAL(A)
Definition:
JMessage.hh:67
JMultipleFileScanner.hh
Scanning of objects from multiple files according a format that follows from the extension of each fi...
JPARSER::not_initialised
Empty structure for specification of parser element that is not initialised (i.e. does require input)...
Definition:
JParser.hh:89
JSUPPORT::JMultipleFileScanner
General purpose class for object reading from a list of file names.
Definition:
JMultipleFileScanner.hh:202
JParser.hh
Utility class to parse command line options.
JROOTClassSelector.hh
JSUPPORT::JLimit::getLimit
const JLimit & getLimit() const
Get limit.
Definition:
JLimit.hh:84
JEvt.hh
Acoustic event fit.
debug
int debug
debug level
Definition:
archive-put-wiki-detectors.sh:92
Generated by
1.8.5