Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
JPrintAcousticsEvent.cc File Reference

Auxiliary program to print acoustic events. More...

#include <iostream>
#include <iomanip>
#include "TROOT.h"
#include "TFile.h"
#include "JSupport/JMultipleFileScanner.hh"
#include "JAcoustics/JEvent.hh"
#include "JAcoustics/JSupport.hh"
#include "Jeep/JPrint.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 print acoustic events.

Author
mdejong

Definition in file JPrintAcousticsEvent.cc.

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 23 of file JPrintAcousticsEvent.cc.

24 {
25  using namespace std;
26  using namespace JPP;
27 
29  JLimit_t& numberOfEvents = inputFile.getLimit();
30  int debug;
31 
32  try {
33 
34  JParser<> zap("Auxiliary program to print acoustic events.");
35 
36  zap['f'] = make_field(inputFile);
37  zap['n'] = make_field(numberOfEvents) = 1;
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 
47  while (inputFile.hasNext()) {
48 
49  const JEvent* evt = inputFile.next();
50 
51  cout << *evt << endl;
52  }
53 }
Utility class to parse command line options.
Definition: JParser.hh:1493
Auxiliary class for defining the range of iterations of objects.
Definition: JLimit.hh:41
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1954
int debug
debug level
Definition: JSirene.cc:61
#define FATAL(A)
Definition: JMessage.hh:67
General purpose class for object reading from a list of file names.
Acoustic event.
const JLimit & getLimit() const
Get limit.
Definition: JLimit.hh:73