22 void storetofGeomAlign()
30 const Int_t NTRAY = 94;
31 const Int_t NVPDTRAY = 2;
32 const Int_t NMAX = 120;
35 gSystem->Load(
"St_base");
36 gSystem->Load(
"StChain");
37 gSystem->Load(
"StUtilities");
38 gSystem->Load(
"St_Tables.so");
40 gSystem->Load(
"StDbLib.so");
41 gSystem->Load(
"libStDb_Tables.so");
47 StDbConfigNode* configNode = dbManager->initConfig(
"Calibrations_tof");
50 TString ZStoreTime =
"2007-11-01 00:00:00";
54 StDbTable* tofGeomAlign = configNode->addDbTable(
"tofGeomAlign");
57 tofGeomAlign_st *tofAlign =
new tofGeomAlign_st[NMAX];
60 for(
int i=0;i<NMAX;i++) {
63 tofAlign[i].phi0 = 0.;
65 tofAlign[i].angle0 = 0.;
66 if(trayId<76||trayId>80)
continue;
67 tofAlign[i].z0 = -0.5;
72 tofGeomAlign->
SetTable((
char*)tofAlign, NMAX);
74 dbManager->setStoreTime(ZStoreTime.Data());
77 dbManager->storeDbTable(tofGeomAlign);
78 cout<<
"uploaded"<<endl;
virtual void SetTable(char *data, int nrows, int *idList=0)
calloc'd version of data for StRoot
static StDbManager * Instance()
strdup(..) is not ANSI