Jpp  17.1.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JPrintAcoustics.cc
Go to the documentation of this file.
1 #include <iostream>
2 #include <iomanip>
3 
4 #include "TROOT.h"
5 #include "TFile.h"
6 
8 
9 #include "JAcoustics/JEvent.hh"
10 #include "JAcoustics/JEvt.hh"
13 #include "JAcoustics/JSupport.hh"
14 
16 #include "JLang/JPipe.hh"
18 
19 #include "Jeep/JPrint.hh"
20 #include "Jeep/JParser.hh"
21 #include "Jeep/JMessage.hh"
22 
23 
24 /**
25  * \file
26  *
27  * Auxiliary program to print acoustic events.
28  * \author mdejong
29  */
30 int main(int argc, char **argv)
31 {
32  using namespace std;
33  using namespace JPP;
34 
35  typedef JAcousticsTypes_t typelist;
36 
38  JLimit_t& numberOfEvents = inputFile.getLimit();
39  JROOTClassSelection selection = getROOTClassSelection<typelist>();
40  int debug;
41 
42  try {
43 
44  JParser<> zap("Auxiliary program to print acoustic events.");
45 
46  zap['f'] = make_field(inputFile);
47  zap['n'] = make_field(numberOfEvents) = 1;
48  zap['C'] = make_field(selection,
49  "Precede name of data structure by a '+' or '-' "
50  "to add or remove data types in the output, respectively."
51  "\nROOT wildcards are accepted.") = JPARSER::initialised();
52  zap['d'] = make_field(debug) = 1;
53 
54  zap(argc, argv);
55  }
56  catch(const exception &error) {
57  FATAL(error.what() << endl);
58  }
59 
61 
62  inputFile | JValve<typelist>(selection) | out;
63 }
Utility class to parse command line options.
Definition: JParser.hh:1500
int main(int argc, char *argv[])
Definition: Main.cc:15
ROOT TTree parameter settings.
Auxiliary class for ROOT class selection.
Acoustic event.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Definition: JParser.hh:66
Auxiliary class for selection of data type.
Acoustic fit parameters.
Type list.
Definition: JTypeList.hh:22
Auxiliary class for defining the range of iterations of objects.
Definition: JLimit.hh:41
I/O formatting auxiliaries.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1961
Implementation of pipe operation for object iterators.
int debug
debug level
Definition: JSirene.cc:67
General purpose messaging.
#define FATAL(A)
Definition: JMessage.hh:67
Scanning of objects from multiple files according a format that follows from the extension of each fi...
Acoustic trigger parameters.
General purpose class for object reading from a list of file names.
Utility class to parse command line options.
Template implementation of stream output for single data type.
const JLimit & getLimit() const
Get limit.
Definition: JLimit.hh:73
Acoustic event fit.