EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
FairDbTableProxy.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file FairDbTableProxy.h
1
#ifndef FAIRDBTABLEPROXY_H
2
#define FAIRDBTABLEPROXY_H
3
4
#include <string>
5
#include <sstream>
6
using
std::string;
7
8
#include "
FairDb.h
"
9
#include "
FairDbProxy.h
"
10
#include "
FairDbTableMetaData.h
"
11
#include "
FairDbValidityRec.h
"
12
#include "
ValContext.h
"
13
#include "
ValTimeStamp.h
"
14
15
class
FairDbCache
;
16
class
FairDbMultConnector
;
17
class
FairDbResult
;
18
class
FairDbTableProxyRegistry
;
19
class
FairDbTableRow
;
20
class
FairDbValidityRec
;
21
class
FairDbValidityRecBuilder
;
22
23
class
FairDbTableProxy
24
{
25
26
friend
class
FairDbTableProxyRegistry
;
27
28
public
:
29
30
// State testing member functions
31
const
FairDbProxy
&
GetDBProxy
()
const
{
return
fDBProxy
; }
32
FairDbMultConnector
&
GetMultConnector
() {
return
*
fMultConnector
; }
33
const
FairDbTableMetaData
&
GetMetaData
()
const
{
return
fMetaData
; }
34
const
FairDbTableMetaData
&
GetMetaValid
()
const
{
return
fMetaValid
; }
35
string
GetRowName
()
const
{
36
return
fTableRow
?
fTableRow
->ClassName() :
"Unknown"
;
37
}
38
string
GetTableName
()
const
{
return
fTableName
;}
39
// State changing member functions
40
FairDbCache
*
GetCache
() {
return
fCache
;}
41
const
FairDbResult
*
Query
(
const
ValContext
& vc,
42
const
FairDb::Task
& task,
43
Bool_t findFullTimeWindow =
true
);
44
const
FairDbResult
*
Query
(
const
string
& context,
45
const
FairDb::Task
& task,
46
const
string
&
data
,
47
const
string
& fillOpts);
48
const
FairDbResult
*
Query
(UInt_t seqNo,UInt_t dbNo);
49
const
FairDbResult
*
Query
(
const
FairDbValidityRec
& vrec,
50
Bool_t canReuse = kTRUE);
51
ValTimeStamp
QueryOverlayCreationDate
(
const
FairDbValidityRec
& vrec,
52
UInt_t dbNo);
53
void
RefreshMetaData
();
54
void
SetSqlCondition
(
const
string
& sql);
55
Bool_t
TableExists
()
const
{
return
fExists
; }
56
57
protected
:
58
59
// Constructors (protected because created and owned by FairDbTableProxyRegistry).
60
FairDbTableProxy
(
FairDbMultConnector
* cascader,
61
const
string
& tableName,
62
const
string
& vldSuffix,
63
const
FairDbTableRow
* tableRow);
64
virtual
~FairDbTableProxy
();
65
66
private
:
67
68
69
FairDbTableProxy
(
const
FairDbTableProxy
&);
70
FairDbTableProxy
&
operator=
(
const
FairDbTableProxy
&);
71
72
73
// Level 2 (disk) cache management.
74
Bool_t
CanReadL2Cache
()
const
;
75
Bool_t
CanWriteL2Cache
()
const
;
76
Bool_t
RestoreFromL2Cache
(
const
FairDbValidityRecBuilder
& builder);
77
Bool_t
SaveToL2Cache
(
const
string
&
name
,
FairDbResult
& res);
78
79
80
FairDbMultConnector
*
fMultConnector
;
81
FairDbTableMetaData
fMetaData
;
82
FairDbTableMetaData
fMetaValid
;
83
Bool_t
fCanL2Cache
;
84
FairDbCache
*
fCache
;
85
FairDbProxy
fDBProxy
;
86
Bool_t
fExists
;
87
string
fTableName
;
88
FairDbTableRow
*
fTableRow
;
89
90
ClassDef(
FairDbTableProxy
,0)
// Object to query a specific table.
91
92
};
93
94
95
#endif // FAIRDBTABLEPROXY_H
EicRoot
blob
master
dbase
dbInterface
FairDbTableProxy.h
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:33
using
1.8.2 with
EIC GitHub integration