Jpp  15.0.2
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JTransitTimeProbablity.cc
Go to the documentation of this file.
1 
2 #include <string>
3 #include <iostream>
4 #include <iomanip>
5 
8 
9 #include "Jeep/JParser.hh"
10 #include "Jeep/JMessage.hh"
11 
12 
13 /**
14  * \file
15  *
16  * Example program to determine PMT transit time probability.
17  * \author mdejong
18  */
19 int main(int argc, char **argv)
20 {
21  using namespace std;
22  using namespace JPP;
23 
24  JTimeRange T_ns;
25  int debug;
26 
27  try {
28 
29  JParser<> zap("Example program to determine PMT transit time probability.");
30 
31  zap['T'] = make_field(T_ns);
32  zap['d'] = make_field(debug) = 3;
33 
34  zap(argc, argv);
35  }
36  catch(const exception &error) {
37  FATAL(error.what() << endl);
38  }
39 
40 
41  const double Plower = getTransitionTime.getProbability(T_ns.getLowerLimit());
42  const double Pupper = getTransitionTime.getProbability(T_ns.getUpperLimit());
43 
44  NOTICE("Lower probability "<< Plower << endl);
45  NOTICE("Upper probability "<< Pupper << endl);
46 }
Utility class to parse command line options.
Definition: JParser.hh:1500
int main(int argc, char *argv[])
Definition: Main.cc:15
JTOOLS::JRange< double > JTimeRange
Type definition for time range (unit [ns]).
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1961
getTransitionTime
Function object to generate transition time.
#define NOTICE(A)
Definition: JMessage.hh:64
int debug
debug level
Definition: JSirene.cc:63
General purpose messaging.
#define FATAL(A)
Definition: JMessage.hh:67
Utility class to parse command line options.