9 void readvpdDelay(
string ZReadTime =
"2029-12-31 23:59:59") {
11 const Int_t NVPD = 38;
14 gSystem->Load(
"St_base");
15 gSystem->Load(
"StChain");
16 gSystem->Load(
"StUtilities");
17 gSystem->Load(
"St_Tables.so");
19 gSystem->Load(
"StDbLib.so");
20 gSystem->Load(
"libStDb_Tables.so");
26 StDbConfigNode* configNode = dbManager->initConfig(
"Calibrations_tof");
28 dbManager->setRequestTime(ZReadTime.c_str());
31 StDbTable* vpdDelayTable = configNode->addDbTable(
"vpdDelay");
33 dbManager->fetchDbTable(vpdDelayTable);
35 cout <<
"version : " << vpdDelayTable->getVersion() <<endl;
36 cout <<
"begin data/time : "<< vpdDelayTable->getBeginDateTime() <<endl;
37 cout <<
"end data/time : " << vpdDelayTable->getEndDateTime() <<endl;
40 vpdDelay_st* vpddelay =
static_cast<vpdDelay_st*
>(vpdDelayTable->GetTable());
43 cout <<
" Oops ... no pointer to table. Exiting" << endl;
48 Int_t nRows = vpdDelayTable->GetNRows();
49 cout <<
" NRows = " << nRows << endl;
51 cout <<
" NRows doesn't match !!! " << endl;
55 cout <<
"read out from database ..." << endl;
58 for (
int i=0;i<NVPD;i++){
59 cout <<
"tubedId = " << i+1 <<
" delay = " << vpddelay.delay[i] << endl;
static StDbManager * Instance()
strdup(..) is not ANSI