Jpp test-rotations-new
the software that should make you happy
Loading...
Searching...
No Matches
software/JDB/JPrintPMTThreshold.cc
Go to the documentation of this file.
1#include <string>
2#include <iostream>
3
4#include "JDB/JDB.hh"
5#include "JDB/JDBToolkit.hh"
6#include "JDB/JSelector.hh"
9
10#include "Jeep/JParser.hh"
11#include "Jeep/JMessage.hh"
12
13
14/**
15 * \file
16 * Auxiliary program to print PMT thresholds.
17 * \author lnauta
18 */
19int main(const int argc, const char * const argv[])
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}
General purpose messaging.
#define FATAL(A)
Definition JMessage.hh:67
int debug
debug level
Definition JSirene.cc:72
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition JParser.hh:2142
Auxiliary class for PMT thresholds.
Utility class to parse command line options.
Definition JParser.hh:1698
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
int main(const int argc, const char *const argv[])
Wrapper class for server name.
Definition JDB.hh:54