Jpp  17.3.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
software/JDB/JPrintPMTThreshold.cc File Reference

Auxiliary program to print PMT thresholds. More...

#include <string>
#include <iostream>
#include "JDB/JDB.hh"
#include "JDB/JDBToolkit.hh"
#include "JDB/JSelector.hh"
#include "JDB/JSelectorSupportkit.hh"
#include "JDB/JPMTThreshold.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"

Go to the source code of this file.

Functions

int main (const int argc, const char *const argv[])
 

Detailed Description

Auxiliary program to print PMT thresholds.

Author
lnauta

Definition in file software/JDB/JPrintPMTThreshold.cc.

Function Documentation

int main ( const int  argc,
const char *const  argv[] 
)

Definition at line 19 of file software/JDB/JPrintPMTThreshold.cc.

20 {
21  using namespace std;
22  using namespace JPP;
23 
24  JServer server;
25  string usr;
26  string pwd;
27  string cookie;
28  string detid;
29  int run;
30  int debug;
31 
32  try {
33 
34  JParser<> zap("Auxiliary program to print PMT thresholds.");
35 
36  zap['s'] = make_field(server) = getServernames();
37  zap['u'] = make_field(usr) = "";
38  zap['!'] = make_field(pwd) = "";
39  zap['C'] = make_field(cookie) = "";
40  zap['D'] = make_field(detid);
41  zap['r'] = make_field(run);
42  zap['d'] = make_field(debug) = 1;
43 
44  zap(argc, argv);
45  }
46  catch(const exception& error) {
47  FATAL(error.what() << endl);
48  }
49 
50 
51  try {
52 
53  JDB::reset(usr, pwd, cookie);
54 
55  JPMTThreshold getPMTThreshold(getDetector<int>(detid), run);
56 
57  cout << getPMTThreshold;
58  }
59  catch(const exception& error) {
60  FATAL(error.what() << endl);
61  }
62 }
Utility class to parse command line options.
Definition: JParser.hh:1517
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1993
#define FATAL(A)
Definition: JMessage.hh:67
void reset(T &value)
Reset value.
std::vector< JServer > getServernames()
Get list of names of available database servers.
Definition: JDB.hh:101
int debug
debug level