Jpp 20.0.0-27-g39925593c-D
the software that should make you happy
Loading...
Searching...
No Matches
Functions
JPinnacles.cc File Reference

Auxiliary program to filter acoustic fit results. More...

#include <iostream>
#include <iomanip>
#include <vector>
#include "TROOT.h"
#include "TFile.h"
#include "JAcoustics/JEvt.hh"
#include "JAcoustics/JSupport.hh"
#include "JSupport/JMultipleFileScanner.hh"
#include "JSupport/JFileRecorder.hh"
#include "JSupport/JMeta.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 filter acoustic fit results.

Author
mdejong

Definition in file JPinnacles.cc.

Function Documentation

◆ main()

int main ( int argc,
char ** argv )

Definition at line 57 of file JPinnacles.cc.

58{
59 using namespace std;
60 using namespace JPP;
61
62
64 JLimit_t& numberOfEvents = inputFile.getLimit();
67 int debug;
68
69 try {
70
71 JParser<> zap("Auxiliary program to filter acoustic fit results.");
72
73 zap['f'] = make_field(inputFile, "input file (output of JKatoomba[.sh])");
74 zap['n'] = make_field(numberOfEvents) = JLimit::max();
75 zap['o'] = make_field(outputFile) = "pinnacles.root";
76 zap['V'] = make_field(veto, "veto acoustics events by UTC time ranges [s]");
77 zap['d'] = make_field(debug) = 2;
78
79 zap(argc, argv);
80 }
81 catch(const exception &error) {
82 FATAL(error.what() << endl);
83 }
84
85
86 outputFile.open();
87
89
90 while (inputFile.hasNext()) {
91
92 STATUS("event: " << setw(10) << inputFile.getCounter() << '\r'); DEBUG(endl);
93
94 const JEvt* evt = inputFile.next();
95
96 if (!veto(*evt)) {
97 outputFile.put(*evt);
98 }
99 }
100
101 outputFile.close();
102}
string outputFile
#define DEBUG(A)
Message macros.
Definition JMessage.hh:62
#define STATUS(A)
Definition JMessage.hh:63
#define FATAL(A)
Definition JMessage.hh:67
int debug
debug level
Definition JSirene.cc:72
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition JParser.hh:2142
Template definition of a multi-dimensional oscillation probability interpolation table.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Acoustic event fit.
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