Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
PdbBankManager.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file PdbBankManager.h
1
// Declaration of class PdbBankManager
2
// Purpose: Abstract factory class to handle banks
3
// Author: Matthias Messer
4
5
#ifndef PDBCAL_BASE_PDBBANKMANAGER_H
6
#define PDBCAL_BASE_PDBBANKMANAGER_H
7
8
#include "
PdbBankID.h
"
9
10
#include <
phool/PHTimeStamp.h
>
11
12
#include <ctime>
13
#include <map>
14
#include <set>
15
#include <string>
16
17
class
PdbCalBank
;
18
class
PdbApplication
;
19
class
PdbCalBankIterator
;
20
21
class
PdbBankManager
22
{
23
24
protected
:
25
26
PdbBankManager
(){}
27
virtual
~PdbBankManager
();
28
29
public
:
30
31
static
PdbBankManager
*
instance
();
32
34
virtual
PdbCalBankIterator
*
getIterator
() = 0;
35
36
virtual
PdbCalBank
*
createBank
(
const
std::string
&,
37
PdbBankID
,
38
const
std::string
&,
39
PHTimeStamp
&,
40
PHTimeStamp
&,
41
const
std::string
&) = 0;
42
43
// create bank with run number as key
44
virtual
PdbCalBank
*
createBank
(
const
int
,
45
const
std::string
&,
46
PdbBankID
,
47
const
std::string
&,
48
const
std::string
&,
49
const
time_t
duration
=60) = 0;
50
51
// create bank for a given range of run numbers rather than timestamps
52
virtual
PdbCalBank
*
createBank
(
const
int
,
53
const
int
,
54
const
std::string
&,
55
PdbBankID
,
56
const
std::string
&,
57
const
std::string
&) = 0;
58
59
virtual
PdbCalBank
*
fetchBank
(
const
std::string
&,
60
PdbBankID
,
61
const
std::string
&,
62
const
int
) = 0;
63
64
virtual
PdbCalBank
*
fetchClosestBank
(
const
std::string
&,
65
PdbBankID
,
66
const
std::string
&,
67
const
int
) = 0;
68
// virtual void fetchAllBanks(PdbBankList &,
69
// const std::string &,
70
// PdbBankID,
71
// const std::string &,
72
// const int) = 0;
73
74
// virtual void fetchAllBanks(PdbBankList &,
75
// const std::string &,
76
// const std::string &,
77
// const int) = 0;
78
79
virtual
PdbCalBank
*
fetchBank
(
const
std::string
&,
80
PdbBankID
,
81
const
std::string
&,
82
const
PHTimeStamp
&) = 0;
83
84
virtual
PdbCalBank
*
fetchClosestBank
(
const
std::string
&,
85
PdbBankID
,
86
const
std::string
&,
87
PHTimeStamp
&) = 0;
88
89
// virtual void fetchAllBanks(PdbBankList &,
90
// const std::string &,
91
// PdbBankID,
92
// const std::string &,
93
// PHTimeStamp &) = 0;
94
95
// virtual void fetchAllBanks(PdbBankList &,
96
// const std::string &,
97
// const std::string &,
98
// PHTimeStamp &) = 0;
99
100
virtual
PdbApplication
*
getApplication
() = 0;
101
102
virtual
void
fillCalibObject
(
PdbCalBank
*,
103
const
std::string
&,
104
PHTimeStamp
&) = 0;
105
106
virtual
void
GetUsedBankRids
(std::map<
std::string
,std::set<int> > &
/*usedbanks*/
)
const
{}
107
virtual
void
ClearUsedBankRids
() {}
108
virtual
void
SetMaxInsertTime
(
const
PHTimeStamp
&
/*tMax*/
) {}
109
110
protected
:
111
112
static
PdbBankManager
*
__instance
;
113
114
};
115
116
#endif
/* PDBCAL_BASE_PDBBANKMANAGER_H */
coresoftware
blob
master
offline
database
pdbcal
base
PdbBankManager.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:04
using
1.8.2 with
sPHENIX GitHub integration