Belle II Software
development
Toggle main menu visibility
Main Page
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
z
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
w
x
z
Typedefs
a
b
c
d
e
g
i
k
l
m
n
p
r
s
t
u
v
w
Enumerations
Enumerator
c
d
f
p
t
v
Classes
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Enumerations
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
Enumerator
a
b
c
d
e
f
g
h
k
l
m
n
o
p
r
s
t
u
v
w
z
Related Functions
b
c
d
g
i
o
r
s
t
Files
File List
File Members
All
Functions
Typedefs
Macros
PostgreSQLInterface.h
1
/**************************************************************************
2
* basf2 (Belle II Analysis Software Framework) *
3
* Author: The Belle II Collaboration *
4
* *
5
* See git log for contributors and copyright holders. *
6
* This file is licensed under LGPL-3.0, see LICENSE.md. *
7
**************************************************************************/
8
#ifndef _Belle2_PostgreSQLInterface_hh
9
#define _Belle2_PostgreSQLInterface_hh
10
11
#include "daq/slc/database/DBInterface.h"
12
#include "daq/slc/system/Mutex.h"
13
14
typedef
struct
pg_conn PGconn;
15
typedef
struct
pg_result PGresult;
16
17
namespace
Belle2
{
23
class
PostgreSQLInterface
:
public
DBInterface
{
24
25
public
:
26
PostgreSQLInterface
(
const
std::string& host,
27
const
std::string& database,
28
const
std::string& user,
29
const
std::string& password,
30
int
port);
31
PostgreSQLInterface
();
32
virtual
~PostgreSQLInterface
() {}
33
34
public
:
35
void
connect()
override
;
36
bool
isConnected()
override
;
37
void
execute_imp(
const
char
* command)
override
;
38
void
close()
override
;
39
void
clear()
override
;
40
DBRecordList loadRecords()
override
;
41
bool
checkTable(
const
std::string& tablename)
override
;
42
DBFieldTypeList getTableContents(
const
std::string& tablename)
override
;
43
44
private
:
45
PGconn* m_sq_conn;
46
PGresult* m_sq_result;
47
Mutex
m_mutex;
48
49
};
50
52
}
53
54
#endif
Belle2::DBInterface
Definition:
DBInterface.h:26
Belle2::Mutex
Definition:
Mutex.h:19
Belle2::PostgreSQLInterface
Definition:
PostgreSQLInterface.h:23
Belle2
Abstract base class for different kinds of events.
Definition:
MillepedeAlgorithm.h:17
daq
slc
psql
include
PostgreSQLInterface.h
Generated on Wed Apr 9 2025 02:38:20 for Belle II Software by
1.9.6