Jpp
18.0.0-rc.3
the software that should make you happy
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
software
JDB
JServerDB.cc
Go to the documentation of this file.
1
#include <iostream>
2
#include <iomanip>
3
4
#include "dbclient/KM3NeTDBClient.h"
5
6
#include "
JDB/JDB.hh
"
7
8
#include "
Jeep/JParser.hh
"
9
#include "
Jeep/JMessage.hh
"
10
11
12
/**
13
* \file
14
*
15
* Auxiliary program to print host name of data base server.
16
* \author mdejong
17
*/
18
int
main
(
int
argc,
char
**argv)
19
{
20
using namespace
std;
21
using namespace
JPP;
22
23
JServer server;
24
int
debug
;
25
26
try
{
27
28
JParser<>
zap(
"Auxiliary program to print host name of data base server."
);
29
30
zap[
's'
] =
make_field
(server) =
getServernames
();
31
zap[
'd'
] =
make_field
(
debug
) = 1;
32
33
zap(argc, argv);
34
}
35
catch
(
const
exception &error) {
36
FATAL
(error.what() << endl);
37
}
38
39
cout <<
JDB::getServer
().HostName() << endl;
40
}
JPARSER::JParser
Utility class to parse command line options.
Definition:
JParser.hh:1514
main
int main(int argc, char *argv[])
Definition:
Main.cc:15
JDATABASE::getServer
const Server & getServer(const std::string &server)
Get server by name.
Definition:
JDB.hh:89
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition:
JParser.hh:1989
JMessage.hh
General purpose messaging.
FATAL
#define FATAL(A)
Definition:
JMessage.hh:67
JParser.hh
Utility class to parse command line options.
JDATABASE::getServernames
std::vector< JServer > getServernames()
Get list of names of available database servers.
Definition:
JDB.hh:106
JDB.hh
debug
int debug
debug level
Definition:
archive-put-wiki-detectors.sh:92
Generated by
1.8.5