Jpp  18.0.1-rc.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
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 JCreep.cc.

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 22 of file 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 }
Utility class to parse command line options.
Definition: JParser.hh:1514
Q(UTCMax_s-UTCMin_s)-livetime_s
#define STATUS(A)
Definition: JMessage.hh:63
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
Acoustic event fit.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1989
#define FATAL(A)
Definition: JMessage.hh:67
General purpose class for object reading from a list of file names.
const JLimit & getLimit() const
Get limit.
Definition: JLimit.hh:84
int debug
debug level
#define DEBUG(A)
Message macros.
Definition: JMessage.hh:62