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
CDBUtils.C
TestCDBHistos.C
TestCDBInsert.C
TestCDBRead.C
TestCDBSubsysReco.C
TestCDBTTree.C
common
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
TestCDBRead.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file TestCDBRead.C
1
#ifndef TESTCDBREAD_C
2
#define TESTCDBREAD_C
3
4
#include <
ffamodules/CDBInterface.h
>
5
6
#include <
phool/recoConsts.h
>
7
8
R__LOAD_LIBRARY(libffamodules.so)
9
R__LOAD_LIBRARY(libphool.so)
10
11
void
TestCDBRead
()
12
{
13
recoConsts
*rc =
recoConsts::instance
();
14
// please choose a unique name, if it is your username it's easier to see who created it
15
rc->
set_StringFlag
(
"CDB_GLOBALTAG"
,
"pinkenbu"
);
16
rc->
set_uint64Flag
(
"TIMESTAMP"
,6);
17
// 1000000 is the insert timestamp. Higher timestamps work, lower time stamps do not
18
CDBInterface
*cdb =
CDBInterface::instance
();
19
cout <<
"using insert timestamp to retrieve no end time payload"
<< endl;
20
rc->
set_uint64Flag
(
"TIMESTAMP"
,10);
21
cout << cdb->
getUrl
(
"TestBeginValidity"
) << endl;
22
cout <<
"using larger timestamp to retrieve no end time payload"
<< endl;
23
rc->
set_uint64Flag
(
"TIMESTAMP"
,100);
24
cout << cdb->
getUrl
(
"TestBeginValidity"
) << endl;
25
cout <<
"using smaller timestamp to retrieve no end time payload"
<< endl;
26
rc->
set_uint64Flag
(
"TIMESTAMP"
,1);
27
cout << cdb->
getUrl
(
"TestBeginValidity"
) << endl;
28
29
cout <<
"using timestamp in range to retrieve calibration with end time"
<< endl;
30
rc->
set_uint64Flag
(
"TIMESTAMP"
,15);
31
cout << cdb->
getUrl
(
"TestBeginEndValidity"
) << endl;
32
cout <<
"using timestamp outside range to retrieve calibration with end time"
<< endl;
33
rc->
set_uint64Flag
(
"TIMESTAMP"
,25);
34
cout << cdb->
getUrl
(
"TestBeginEndValidity"
) << endl;
35
gSystem->Exit(0);
36
return
;
37
}
38
39
#endif
40
macros
blob
master
CDBTest
TestCDBRead.C
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:26
using
1.8.2 with
sPHENIX GitHub integration