Jpp 20.0.0-rc.9-29-gccc23c492-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
63 JMultipleFileScanner<JEvt> inputFile;
64 JLimit_t& numberOfEvents = inputFile.getLimit();
65 JFileRecorder<JTYPELIST<JEvt, JMeta>::typelist> outputFile;
66 JContainer<veto_type, vector< JRange<double> > > veto;
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
88 outputFile.put(JMeta(argc, argv));
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}
Acoustic event fit.
Definition JEvt.hh:310