Jpp 21.0.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
JConvertAcoustics.cc File Reference

Auxiliary program to convert acoustic events. More...

#include <iostream>
#include <iomanip>
#include <memory>
#include "TROOT.h"
#include "TFile.h"
#include "JSupport/JMultipleFileScanner.hh"
#include "JSupport/JFileRecorder.hh"
#include "JSupport/JMeta.hh"
#include "JAcoustics/JEvent.hh"
#include "JAcoustics/JEvt.hh"
#include "JAcoustics/JSuperEvt.hh"
#include "JAcoustics/JSupport.hh"
#include "JLang/JPipe.hh"
#include "JLang/JObjectSelector.hh"
#include "JROOT/JROOTClassSelector.hh"
#include "JTools/JRange.hh"
#include "Jeep/JContainer.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Detailed Description

Auxiliary program to convert acoustic events.

Author
mdejong

Definition in file JConvertAcoustics.cc.

Function Documentation

◆ main()

int main ( int argc,
char ** argv )

Definition at line 157 of file JConvertAcoustics.cc.

158{
159 using namespace std;
160 using namespace JPP;
161
164
166 JFileRecorder <typelist> outputFile;
167 JLimit_t& numberOfEvents = inputFile.getLimit();
169 JSelector_t selector;
170 int debug;
171
172 try {
173
174 JParser<> zap("Auxiliary program to convert acoustic events.");
175
176 zap['f'] = make_field(inputFile);
177 zap['o'] = make_field(outputFile);
178 zap['n'] = make_field(numberOfEvents) = JLimit::max();
179 zap['C'] = make_field(selection,
180 "Precede name of data structure by a '+' or '-' "
181 "to add or remove data types in the output, respectively."
182 "\nROOT wildcards are accepted.") = JPARSER::initialised();
183 zap['r'] = make_field(selector,
184 "veto UTC time ranges [s]") = JPARSER::initialised();
185 zap['d'] = make_field(debug) = 1;
186
187 zap(argc, argv);
188 }
189 catch(const exception &error) {
190 FATAL(error.what() << endl);
191 }
192
193 outputFile.open();
194
195 outputFile.put(JMeta(argc,argv));
196
197 inputFile | JValve<typelist>(selection) | selector | outputFile;
198
199 outputFile.close();
200}
string outputFile
#define FATAL(A)
Definition JMessage.hh:67
int debug
debug level
Definition JSirene.cc:74
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition JParser.hh:2140
Auxiliary class for selection of data type.
Definition JValve.hh:23
Utility class to parse command line options.
Definition JParser.hh:1697
General purpose class for object reading from a list of file names.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
std::set< JROOTClassSelector > getROOTClassSelection(const bool option=false)
Get ROOT class selection.
Auxiliary wrapper for I/O of container with optional comment (see JComment).
Definition JContainer.hh:42
Type list.
Definition JTypeList.hh:23
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Definition JParser.hh:67
Auxiliary class for ROOT class selection.
Auxiliary class for defining the range of iterations of objects.
Definition JLimit.hh:45
static counter_type max()
Get maximum counter value.
Definition JLimit.hh:128
Auxiliary class for ROOT I/O of application specific meta data.
Definition JMeta.hh:72