17 void storeTofTrayConfig()
21 gSystem->Load(
"St_base");
22 gSystem->Load(
"StChain");
23 gSystem->Load(
"StUtilities");
24 gSystem->Load(
"St_Tables.so");
27 gSystem->Load(
"StDbLib.so");
28 gSystem->Load(
"libStDb_Tables.so");
34 StDbConfigNode* configNode = dbManager->initConfig(
"Calibrations_tof");
50 TString storeTime =
"2009-11-01 00:00:00";
53 StDbTable* toftrayconfig = configNode->addDbTable(
"tofTrayConfig");
97 const Int_t ntrays = 120;
98 Short_t iTray[ntrays];
99 Short_t nModules[ntrays];
100 for(
int i=0;i<ntrays;i++) {
105 tofTrayConfig_st *toftrayconf =
new tofTrayConfig_st[1];
107 toftrayconf[0].entries = ntrays;
108 for(
int i=0;i<120;i++) {
110 toftrayconf[0].iTray[i] = iTray[i];
111 toftrayconf[0].nModules[i] = nModules[i];
113 toftrayconf[0].iTray[i] = 0;
114 toftrayconf[0].nModules[i] = 0;
119 toftrayconfig->
SetTable((
char*)toftrayconf, 1);
121 dbManager->setStoreTime(storeTime.Data());
123 dbManager->storeDbTable(toftrayconfig);
virtual void SetTable(char *data, int nrows, int *idList=0)
calloc'd version of data for StRoot
static StDbManager * Instance()
strdup(..) is not ANSI