19 void readtofTDIGOnTray(
string ZReadTime =
"2029-12-31 23:59:59")
22 gSystem->Load(
"St_base");
23 gSystem->Load(
"StChain");
24 gSystem->Load(
"StUtilities");
25 gSystem->Load(
"St_Tables.so");
27 gSystem->Load(
"StDbLib.so");
28 gSystem->Load(
"libStDb_Tables.so");
34 StDbConfigNode* configNode = dbManager->initConfig(
"Calibrations_tof");
36 dbManager->setRequestTime(ZReadTime.c_str());
38 StDbTable* tofmaptable = configNode->addDbTable(
"tofTDIGOnTray");
40 dbManager->fetchDbTable(tofmaptable);
42 cout<<tofmaptable->getVersion()<<endl;
44 cout<<tofmaptable->getBeginDateTime()<<endl;
45 cout<<tofmaptable->getEndDateTime()<<endl;
47 tofTDIGOnTray_st* maptable =
static_cast<tofTDIGOnTray_st*
>(tofmaptable->GetTable());
49 cout<<
"Read out from DataBase-------------->"<<endl;
50 Int_t nRows = tofmaptable->GetNRows();
51 cout <<
" nRows = " << nRows << endl;
52 for(
int i=0;i<nRows;i++) {
53 short trayId = maptable[i].trayId;
54 for(
int j=0;j<8;j++) {
55 cout << maptable[i].tdigId[j] <<
" ";
static StDbManager * Instance()
strdup(..) is not ANSI