Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
examples/JAcoustics/JCreep.cc
Go to the documentation of this file.
1#include <iostream>
2#include <iomanip>
3
5
6#include "JTools/JQuantile.hh"
7
8#include "JAcoustics/JEvt.hh"
10
11#include "Jeep/JPrint.hh"
12#include "Jeep/JParser.hh"
13#include "Jeep/JMessage.hh"
14
15
16/**
17 * \file
18 *
19 * Auxialiry program to determine average creep of strings.
20 * \author mdejong
21 */
22int main(int argc, char **argv)
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}
66
Acoustic event fit.
ROOT TTree parameter settings.
General purpose messaging.
#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
Scanning of objects from multiple files according a format that follows from the extension of each fi...
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition JParser.hh:2142
I/O formatting auxiliaries.
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.
int main(int argc, char **argv)
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