Jpp  15.0.1-rc.2-highQE
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JHighRateVeto.cc
Go to the documentation of this file.
1 
2 #include <string>
3 #include <iostream>
4 #include <iomanip>
5 #include <limits>
6 
7 #include "JDAQ/JHighRateVeto.hh"
8 
9 #include "Jeep/JPrint.hh"
10 #include "Jeep/JParser.hh"
11 #include "Jeep/JMessage.hh"
12 
13 
14 /**
15  * \file
16  *
17  * Example program to print high-rate veto related quantities.
18  * \author mdejong
19  */
20 int main(int argc, char **argv)
21 {
22  using namespace std;
23  using namespace JPP;
24  using namespace KM3NETDAQ;
25 
26  double R_Hz;
27  int debug;
28 
29  try {
30 
31  JParser<> zap("Example program to print high-rate veto related quantities.");
32 
33  zap['B'] = make_field(R_Hz);
34  zap['d'] = make_field(debug) = 2;
35 
36  zap(argc, argv);
37  }
38  catch(const exception& error) {
39  FATAL(error.what() << endl);
40  }
41 
42 
43  cout << "High-rate veto [Hz] " << HIGH_RATE_VETO_HZ << endl;
44  cout << "Maximal number of hits " << getMaximalNumberOfHits() << endl;
45  cout << "Maximal time [ns] " << getMaximalTime(R_Hz) << endl;
46 }
Utility class to parse command line options.
Definition: JParser.hh:1500
int main(int argc, char *argv[])
Definition: Main.cc:15
size_t getMaximalNumberOfHits()
Get maximal number of hits from one PMT within data frame.
I/O formatting auxiliaries.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1961
int debug
debug level
Definition: JSirene.cc:63
double getMaximalTime(const double R_Hz)
Get maximal time for given rate.
General purpose messaging.
#define FATAL(A)
Definition: JMessage.hh:67
Utility class to parse command line options.
static double HIGH_RATE_VETO_HZ
High-rate veto [kHz].