Jpp  18.0.0-rc.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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"
9 #include "JAcoustics/JSupport.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  */
22 int 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 
Utility class to parse command line options.
Definition: JParser.hh:1514
Q(UTCMax_s-UTCMin_s)-livetime_s
int main(int argc, char *argv[])
Definition: Main.cc:15
#define STATUS(A)
Definition: JMessage.hh:63
ROOT TTree parameter settings.
Auxiliary data structure for floating point format specification.
Definition: JManip.hh:446
Auxiliary class for defining the range of iterations of objects.
Definition: JLimit.hh:41
I/O formatting auxiliaries.
Acoustic event fit.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1989
General purpose messaging.
#define FATAL(A)
Definition: JMessage.hh:67
Scanning of objects from multiple files according a format that follows from the extension of each fi...
General purpose class for object reading from a list of file names.
Utility class to parse command line options.
const JLimit & getLimit() const
Get limit.
Definition: JLimit.hh:84
Acoustic event fit.
int debug
debug level
#define DEBUG(A)
Message macros.
Definition: JMessage.hh:62