Jpp
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
software
JDB
JAsciiDB.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
#include "
JDB/JDBToolkit.hh
"
8
#include "
JDB/JSelector.hh
"
9
#include "
JDB/JSupport.hh
"
10
11
#include "
JDB/JDBincludes.hh
"
12
#include "
JDB/JDatabaseObjectIterator.hh
"
13
#include "
JROOT/JRootStreamObjectOutput.hh
"
14
#include "
JROOT/JRootDictionary.hh
"
15
16
#include "
Jeep/JParser.hh
"
17
#include "
Jeep/JMessage.hh
"
18
19
20
/**
21
* \file
22
*
23
* Auxiliary program to convert data from data base into ASCII format.
24
* \author mdejong
25
*/
26
int
main
(
int
argc,
char
**argv)
27
{
28
using namespace
std;
29
using namespace
JPP;
30
31
typedef
JDBTypes_t
typelist;
32
33
string
usr;
34
string
pwd;
35
string
cookie;
36
string
query;
37
JSelector selection;
38
int
debug
;
39
40
try
{
41
42
JParser<>
zap(
"Auxiliary program to convert data from data base into ASCII format."
);
43
44
zap[
'u'
] =
make_field
(usr) =
""
;
45
zap[
'!'
] =
make_field
(pwd) =
""
;
46
zap[
'C'
] =
make_field
(cookie) =
""
;
47
zap[
'q'
] =
make_field
(query) = getQueries<typelist>();
48
zap[
'@'
] =
make_field
(selection) =
JPARSER::initialised
();
49
zap[
'd'
] =
make_field
(
debug
) = 1;
50
51
zap[
'q'
] =
JPARSER::not_initialised
();
52
53
zap(argc, argv);
54
}
55
catch
(
const
exception &error) {
56
FATAL
(error.what() << endl);
57
}
58
59
60
JRootWriter writer(cout, JEquationParameters(),
JRootDictionary::getInstance
());
61
62
JRootStreamObjectOutput<typelist> out(writer,
"\n"
);
63
64
try
{
65
66
JDB::reset
(usr, pwd, cookie);
67
68
JDetectorsHelper::initialise();
69
70
JDatabaseObjectIterator<typelist>
in
(query, selection);
71
72
in >> out;
73
}
74
catch
(
const
exception& error) {
75
FATAL
(error.what() << endl);
76
}
77
}
JPARSER::JParser
Utility class to parse command line options.
Definition:
JParser.hh:1493
JRootDictionary.hh
JDatabaseObjectIterator.hh
in
esac print_variable DETECTOR INPUT_FILE OUTPUT_FILE CDF for TYPE in
Definition:
JSirene.sh:45
JPARSER::initialised
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Definition:
JParser.hh:63
JDBToolkit.hh
JRootStreamObjectOutput.hh
JLANG::JTypeList
Type list.
Definition:
JTypeList.hh:22
JSelector.hh
JLANG::getInstance
T & getInstance(const T &object)
Get static instance from temporary object.
Definition:
JObject.hh:75
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition:
JParser.hh:1954
JSupport.hh
ROOT TTree parameter settings.
debug
int debug
debug level
Definition:
JSirene.cc:61
JMessage.hh
General purpose messaging.
FATAL
#define FATAL(A)
Definition:
JMessage.hh:67
JPARSER::not_initialised
Empty structure for specification of parser element that is not initialised (i.e. does require input)...
Definition:
JParser.hh:69
JTOOLS::reset
void reset(T &value)
Reset value.
Definition:
JToolsToolkit.hh:219
JParser.hh
Utility class to parse command line options.
JDBincludes.hh
This file is automatically created by make.
JDB.hh
main
int main(int argc, char *argv[])
Definition:
Main.cpp:15
Generated by
1.8.5