Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
Analysis Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
acts-fatras
analysis
analysis_tpc_prototype
coresoftware
Doxygen_Assist
g4exampledetector
GenFit
JETSCAPE
KFParticle
macros
blob
master
calibrations
CaloProduction
CDBTest
common
CDBUtils.C
DisplayOn.C
Fun4All_CaloProduction.C
G4_ActsGeom.C
G4_BeamLine.C
G4_BlackHole.C
G4_CaloTrigger.C
G4_CEmc_Albedo.C
G4_CEmc_Spacal.C
G4_Centrality.C
G4_DSTReader.C
G4_EPD.C
G4_Global.C
G4_HcalIn_ref.C
G4_HcalOut_ref.C
G4_HIJetReco.C
G4_Input.C
G4_Jets.C
G4_KFParticle.C
G4_Magnet.C
G4_Mbd.C
G4_ParticleFlow.C
G4_Pipe.C
G4_PlugDoor.C
G4_Production.C
G4_PSTOF.C
G4_TopoClusterReco.C
G4_Tracking.C
G4_Tracking_Cosmics.C
G4_TrkrSimulation.C
G4_TrkrVariables.C
G4_User.C
G4_World.C
G4_ZDC.C
GlobalVariables.C
HIJetReco.C
QA.C
sPhenixStyle.C
sPhenixStyle.h
Trkr_Clustering.C
Trkr_CommissioningReco.C
Trkr_Diagnostics.C
Trkr_Eval.C
Trkr_LaserClustering.C
Trkr_QA.C
Trkr_Reco.C
Trkr_Reco_Cosmics.C
Trkr_RecoInit.C
Trkr_TruthReco.C
Trkr_TruthTables.C
detectors
eventcombine
InttProduction
macros
MvtxProduction
StreamingProduction
TpcProduction
TrackingProduction
validation
online_distribution
OnlMon
prototype
pythia6
rcdaq
RDBC
tutorials
doxygen_mainpage.h
File Members
Examples
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
CDBUtils.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file CDBUtils.C
1
#ifndef CDBUTILS_C
2
#define CDBUTILS_C
3
4
#include <
sphenixnpc/CDBUtils.h
>
5
#include <
sphenixnpc/SphenixClient.h
>
6
7
#include <
phool/recoConsts.h
>
8
9
R__LOAD_LIBRARY(libsphenixnpc.so)
10
R__LOAD_LIBRARY(libphool.so)
11
12
CDBUtils
*
uti
=
nullptr
;
13
14
CDBUtils
*
getCDBUtils
()
15
{
16
return
uti
;
17
}
18
19
void
listGlobalTags
()
20
{
21
if
(!
uti
)
uti
=
new
CDBUtils
();
22
uti
->
listGlobalTags
();
23
return
;
24
}
25
26
void
listPayloadTypes
()
27
{
28
if
(!
uti
)
uti
=
new
CDBUtils
();
29
uti
->
listPayloadTypes
();
30
return
;
31
}
32
33
void
listPayloadIOVs
(uint64_t iov)
34
{
35
if
(!
uti
)
uti
=
new
CDBUtils
();
36
uti
->
listPayloadIOVs
(iov);
37
return
;
38
}
39
40
void
createGlobalTag
(
const
std::string
&tagname)
41
{
42
if
(!
uti
)
uti
=
new
CDBUtils
();
43
uti
->
createGlobalTag
(tagname);
44
return
;
45
}
46
47
void
deleteGlobalTag
(
const
std::string
&tagname)
48
{
49
if
(!
uti
)
uti
=
new
CDBUtils
();
50
uti
->
deleteGlobalTag
(tagname);
51
return
;
52
}
53
54
void
lockGlobalTag
(
const
std::string
&tagname)
55
{
56
if
(!
uti
)
uti
=
new
CDBUtils
();
57
uti
->
lockGlobalTag
(tagname);
58
return
;
59
}
60
61
void
unlockGlobalTag
(
const
std::string
&tagname)
62
{
63
if
(!
uti
)
uti
=
new
CDBUtils
();
64
uti
->
unlockGlobalTag
(tagname);
65
return
;
66
}
67
68
int
setGlobalTag
(
const
std::string
&tagname)
69
{
70
if
(!
uti
)
uti
=
new
CDBUtils
();
71
int
iret =
uti
->
setGlobalTag
(tagname);
72
return
iret;
73
}
74
75
int
cloneGlobalTag
(
const
std::string
&
source
,
const
std::string
&
target
)
76
{
77
if
(!
uti
)
uti
=
new
CDBUtils
();
78
int
iret =
uti
->
cloneGlobalTag
(source, target);
79
return
iret;
80
}
81
82
83
int
createPayloadType
(
const
std::string
&
pt
)
84
{
85
if
(!
uti
)
uti
=
new
CDBUtils
();
86
int
iret =
uti
->
createPayloadType
(pt);
87
return
iret;
88
}
89
90
int
insertPayload
(
const
std::string
&pl_type,
const
std::string
&file_url, uint64_t iov_start)
91
{
92
if
(!
uti
)
uti
=
new
CDBUtils
();
93
if
(
uti
->
isGlobalTagSet
())
94
{
95
uti
->
insertPayload
(pl_type,file_url,iov_start);
96
}
97
return
0;
98
}
99
100
int
insertPayload
(
const
std::string
&pl_type,
const
std::string
&file_url, uint64_t iov_start, uint64_t iov_end)
101
{
102
if
(!
uti
)
uti
=
new
CDBUtils
();
103
if
(
uti
->
isGlobalTagSet
())
104
{
105
uti
->
insertPayload
(pl_type,file_url,iov_start,iov_end);
106
}
107
return
0;
108
}
109
110
std::string
getCalibration
(
const
std::string
&pl_type, uint64_t iov)
111
{
112
if
(!
uti
)
uti
=
new
CDBUtils
();
113
return
uti
->
getUrl
(pl_type,iov);
114
}
115
116
void
clearCache
()
117
{
118
if
(!
uti
)
uti
=
new
CDBUtils
();
119
return
uti
->
clearCache
();
120
}
121
122
void
Verbosity
(
int
verb)
123
{
124
if
(!
uti
)
uti
=
new
CDBUtils
();
125
return
uti
->
Verbosity
(verb);
126
}
127
128
int
deletePayloadIOV
(
const
std::string
& pl_type, uint64_t iov_start)
129
{
130
if
(!
uti
)
uti
=
new
CDBUtils
();
131
return
uti
->
deletePayloadIOV
(pl_type,iov_start);
132
}
133
134
int
deletePayloadIOV
(
const
std::string
& pl_type, uint64_t iov_start, uint64_t iov_end)
135
{
136
if
(!
uti
)
uti
=
new
CDBUtils
();
137
return
uti
->
deletePayloadIOV
(pl_type,iov_start, iov_end);
138
}
139
140
#endif
macros
blob
master
common
CDBUtils.C
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:26
using
1.8.2 with
sPHENIX GitHub integration