Jpp  18.0.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"
11 #include "JAcoustics/JSuperEvt.hh"
14 #include "JAcoustics/JSupport.hh"
15 
17 #include "JLang/JPipe.hh"
19 
20 #include "Jeep/JPrint.hh"
21 #include "Jeep/JParser.hh"
22 #include "Jeep/JMessage.hh"
23 
24 
25 /**
26  * \file
27  *
28  * Auxiliary program to print acoustic events.
29  * \author mdejong
30  */
31 int main(int argc, char **argv)
32 {
33  using namespace std;
34  using namespace JPP;
35 
36  typedef JAcousticsTypes_t typelist;
37 
39  JLimit_t& numberOfEvents = inputFile.getLimit();
40  JROOTClassSelection selection = getROOTClassSelection<typelist>();
41  int debug;
42 
43  try {
44 
45  JParser<> zap("Auxiliary program to print acoustic events.");
46 
47  zap['f'] = make_field(inputFile);
48  zap['n'] = make_field(numberOfEvents) = 1;
49  zap['C'] = make_field(selection,
50  "Precede name of data structure by a '+' or '-' "
51  "to add or remove data types in the output, respectively."
52  "\nROOT wildcards are accepted.") = JPARSER::initialised();
53  zap['d'] = make_field(debug) = 1;
54 
55  zap(argc, argv);
56  }
57  catch(const exception &error) {
58  FATAL(error.what() << endl);
59  }
60 
62 
63  inputFile | JValve<typelist>(selection) | out;
64 }
Utility class to parse command line options.
Definition: JParser.hh:1514
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:83
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:1989
Acoustic event fit.
Implementation of pipe operation for object iterators.
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:84
Acoustic event fit.
int debug
debug level