Jpp 19.3.0-rc.3
the software that should make you happy
Loading...
Searching...
No Matches
JCreep.cc File Reference

Auxialiry program to determine average creep of strings. More...

#include <iostream>
#include <iomanip>
#include "JSupport/JMultipleFileScanner.hh"
#include "JTools/JQuantile.hh"
#include "JAcoustics/JEvt.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

Auxialiry program to determine average creep of strings.

Author
mdejong

Definition in file examples/JAcoustics/JCreep.cc.

Function Documentation

◆ main()

int main ( int argc,
char ** argv )

Definition at line 22 of file examples/JAcoustics/JCreep.cc.

23{
24 using namespace std;
25 using namespace JPP;
26
28 JLimit_t& numberOfEvents = inputFile.getLimit();
29 int debug;
30
31 try {
32
33 JParser<> zap("Auxialiry program to determine average creep of strings.");
34
35 zap['f'] = make_field(inputFile, "input file (output of JKatoomba[.sh])");
36 zap['n'] = make_field(numberOfEvents) = JLimit::max();
37 zap['d'] = make_field(debug) = 2;
38
39 zap(argc, argv);
40 }
41 catch(const exception &error) {
42 FATAL(error.what() << endl);
43 }
44
45
47
48 while (inputFile.hasNext()) {
49
50 STATUS("event: " << setw(10) << inputFile.getCounter() << '\r'); DEBUG(endl);
51
52 const JEvt* evt = inputFile.next();
53
54 for (JEvt::const_iterator i = evt->begin(); i != evt->end(); ++i) {
55 Q[i->id].put(i->vs);
56 }
57 }
58 STATUS(endl);
59
60 for (map<int, JQuantile>::const_iterator i = Q.begin(); i != Q.end(); ++i) {
61 cout << setw(4) << i->first << ' '
62 << FIXED(9,6) << i->second.getMean() << ' '
63 << FIXED(9,6) << i->second.getSTDev() << endl;
64 }
65}
#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
Utility class to parse command line options.
Definition JParser.hh:1698
General purpose class for object reading from a list of file names.
virtual bool hasNext() override
Check availability of next element.
counter_type getCounter() const
Get counter.
virtual const pointer_type & next() override
Get next element.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure for floating point format specification.
Definition JManip.hh:448
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