ECCE @ EIC Software
Reference for
ECCE @ 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
PgPostBankBackupStorage.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file PgPostBankBackupStorage.h
1
// Tell emacs that this is a C++ source
2
// -*- C++ -*-.
11
#ifndef PDBCALPG_PGPOSTBANKBACKUPSTORAGE_H
12
#define PDBCALPG_PGPOSTBANKBACKUPSTORAGE_H
13
14
#include <pdbcalbase/PdbCalChan.h>
15
16
#include <
phool/PHTimeStamp.h
>
17
18
#include <TNamed.h>
19
#include <TObject.h>
20
21
#include <cstddef>
22
#include <string>
23
24
class
PgPostCalBank
;
25
class
PdbCalBank
;
26
30
class
PgPostBankBackupStorage
:
public
TNamed
31
{
32
public
:
35
PgPostBankBackupStorage
(
PdbCalBank
*
b
);
36
37
PgPostBankBackupStorage
();
38
39
virtual
~PgPostBankBackupStorage
();
40
41
virtual
void
42
Print
(Option_t *option =
""
)
const
;
43
44
bool
45
isValid
()
const
;
46
47
void
48
format_name_title
();
49
52
PgPostCalBank
*
53
createBank
();
54
55
class
BankHeader
:
public
TObject
56
{
57
public
:
58
enum
59
{
60
INVALID_BANKID
= -999999
61
};
62
63
BankHeader
()
64
:
bankID
(
INVALID_BANKID
)
65
,
description
(
66
"not assigned"
)
67
,
userName
(
"not assigned"
)
68
,
tableName
(
69
"not assigned"
)
70
,
rid
(
INVALID_BANKID
)
71
{
72
}
73
74
~BankHeader
()
75
{
76
}
77
78
virtual
void
79
Print
(Option_t *option =
""
)
const
;
80
81
int
82
getBankID
()
const
83
{
84
return
bankID
;
85
}
86
87
PHTimeStamp
88
getInsertTime
()
const
89
{
90
return
insertTime
;
91
}
92
93
PHTimeStamp
94
getStartValTime
()
const
95
{
96
return
startValTime
;
97
}
98
99
PHTimeStamp
100
getEndValTime
()
const
101
{
102
return
endValTime
;
103
}
104
105
std::string
106
getDescription
()
const
107
{
108
return
description
;
109
}
110
111
std::string
112
getUserName
()
const
113
{
114
return
userName
;
115
}
116
117
std::string
118
getTableName
()
const
119
{
120
return
tableName
;
121
}
122
123
int
124
getRId
()
const
125
{
126
return
rid
;
127
}
128
129
void
130
setBankID
(
const
int
val)
131
{
132
bankID
= val;
133
}
134
135
void
136
setInsertTime
(
const
PHTimeStamp
&val)
137
{
138
insertTime
= val;
139
}
140
141
void
142
setStartValTime
(
const
PHTimeStamp
&val)
143
{
144
startValTime
= val;
145
}
146
147
void
148
setEndValTime
(
const
PHTimeStamp
&val)
149
{
150
endValTime
= val;
151
}
152
153
void
154
setDescription
(
const
std::string &val)
155
{
156
description
= val;
157
}
158
159
void
160
setUserName
(
const
std::string &val)
161
{
162
userName
= val;
163
}
164
165
void
166
setTableName
(
const
std::string &val)
167
{
168
tableName
= val;
169
}
170
171
void
172
setRId
(
int
r
)
173
{
174
rid
=
r
;
175
}
176
177
std::string
178
get_id_string
()
const
;
179
180
private
:
181
int
bankID
;
182
PHTimeStamp
insertTime
;
183
PHTimeStamp
startValTime
;
184
PHTimeStamp
endValTime
;
185
std::string
description
;
186
std::string
userName
;
187
std::string
tableName
;
188
int
rid
;
189
190
ClassDefOverride(
PgPostBankBackupStorage::BankHeader
, 1)
191
};
192
193
void
194
printEntry
(
size_t
s
)
195
{
196
getEntry
(s).
print
();
197
}
198
199
size_t
200
getLength
()
const
;
201
202
PdbCalChan
&
203
getEntry
(
size_t
pos
);
204
205
const
PdbCalBank
*
206
get_bank
()
const
207
{
208
return
bank
;
209
}
210
211
PdbCalBank
*
212
get_bank
()
213
{
214
return
bank
;
215
}
216
217
const
BankHeader &
218
get_database_header
()
const
219
{
220
return
database_header
;
221
}
222
223
BankHeader &
224
get_database_header
()
225
{
226
return
database_header
;
227
}
228
229
void
230
set_database_header
(
const
BankHeader
&databaseHeader)
231
{
232
database_header
= databaseHeader;
233
}
234
235
const
std::string &
236
get_obj_classname
()
const
237
{
238
return
obj_classname
;
239
}
240
241
std::string &
242
get_obj_classname
()
243
{
244
return
obj_classname
;
245
}
246
247
void
248
set_obj_classname
(
const
std::string &
name
)
249
{
250
obj_classname
=
name
;
251
}
252
253
const
BankHeader &
254
get_obj_header
()
const
255
{
256
return
obj_header
;
257
}
258
259
BankHeader &
260
get_obj_header
()
261
{
262
return
obj_header
;
263
}
264
265
void
266
set_obj_header
(
const
BankHeader
&objHeader)
267
{
268
obj_header
= objHeader;
269
}
270
272
void
273
set_obj_info
(
const
PgPostCalBank
*bankwapper);
274
275
private
:
277
BankHeader
database_header
;
279
BankHeader
obj_header
;
281
std::string
obj_classname
;
283
PdbCalBank
*
bank
;
284
285
ClassDefOverride(
PgPostBankBackupStorage
, 1)
286
};
287
288
#endif
/* PDBCAL_PG_PGPOSTBANKBACKUPSTORAGE_H */
coresoftware
blob
master
offline
database
pdbcal
pg
PgPostBankBackupStorage.h
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:33
using
1.8.2 with
ECCE GitHub integration