22 void storetofTrgWindow()
29 const Int_t NTRAY = 120;
30 const Int_t NVPDTRAY = 2;
31 const Int_t NMAX = 120;
35 gSystem->Load(
"St_base");
36 gSystem->Load(
"StChain");
37 gSystem->Load(
"StUtilities");
38 gSystem->Load(
"St_Tables.so");
39 gSystem->Load(
"StDbLib.so");
40 gSystem->Load(
"libStDb_Tables.so");
46 StDbConfigNode* configNode = dbManager->initConfig(
"Calibrations_tof");
49 TString ZStoreTime =
"2019-01-01 00:00:00";
52 StDbTable* tofTrgWindow = configNode->addDbTable(
"tofTrgWindow");
55 tofTrgWindow_st *trg =
new tofTrgWindow_st[NMAX+NVPDTRAY+NMTD];
58 1007, 1007, 1007, 1008, 1015, 1015, 1015, 1015, 1014, 1015, 1015, 1015, 1013, 1013, 1015, 1016, 1008, 1008, 1008, 1009, 934, 935, 935, 934, 932, 934, 940, 942, 939, 0, 939, 948, 949, 0, 949, 947, 949, 947, 949, 941, 942, 942, 942, 939, 932, 932, 934, 934, 935, 932, 990, 993, 990, 998, 998, 1000, 1000, 1000, 1007, 1007, 1003, 1003, 994, 995, 995, 999, 997, 999, 997, 999, 999, 1005, 1008, 1004, 1007, 1004, 1012, 1014, 1014, 1013, 1012, 1013, 1013, 1013, 1004, 1004, 1004, 1004, 1004, 997, 997, 998, 998, 998, 998, 1010, 1010, 1010, 1010, 1019, 1019, 0, 1019, 1018, 1019, 1018, 1018, 1019, 1018, 1018, 1018, 1010, 1012, 1010, 1010, 1009, 1010, 1001, 1002, 1003, 958, 1019};
61 1122, 1122, 1122, 1123, 1130, 1130, 1130, 1130, 1129, 1130, 1130, 1130, 1128, 1128, 1130, 1131, 1123, 1123, 1123, 1124, 1049, 1050, 1050, 1049, 1047, 1049, 1055, 1057, 1054, 0, 1054, 1063, 1064, 0, 1064, 1062, 1064, 1062, 1064, 1056, 1057, 1057, 1057, 1054, 1047, 1047, 1049, 1049, 1050, 1047, 1105, 1108, 1105, 1113, 1113, 1115, 1115, 1115, 1122, 1122, 1118, 1118, 1109, 1110, 1110, 1114, 1112, 1114, 1112, 1114, 1114, 1120, 1123, 1119, 1122, 1119, 1127, 1129, 1129, 1128, 1127, 1128, 1128, 1128, 1119, 1119, 1119, 1119, 1119, 1112, 1112, 1113, 1113, 1113, 1113, 1125, 1125, 1125, 1125, 1134, 1134, 0, 1134, 1133, 1134, 1133, 1133, 1134, 1133, 1133, 1133, 1125, 1127, 1125, 1125, 1124, 1125, 1116, 1117, 1118, 1073, 1134};
65 for(
int i=0;i<NMAX+NVPDTRAY;i++)
67 trg[i].trgWindow_Min = cutlow[i];
68 trg[i].trgWindow_Max = cuthi[i];
69 cout <<
" tray = " << i+1 <<
" min = " << trg[i].trgWindow_Min <<
" max = " << trg[i].trgWindow_Max << endl;
73 tofTrgWindow->
SetTable((
char*)trg, NMAX+NVPDTRAY);
75 dbManager->setStoreTime(ZStoreTime.Data());
78 dbManager->storeDbTable(tofTrgWindow);
79 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