22 void storetofTrgWindow()
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");
51 TString ZStoreTime =
"2009-02-01 00:00:00";
54 StDbTable* tofTrgWindow = configNode->addDbTable(
"tofTrgWindow");
57 tofTrgWindow_st *trg =
new tofTrgWindow_st[NMAX+NVPDTRAY];
78 unsigned short cutlow[122]={22600,22600,22600,22600,22600,22600,22600,22600,22600,22600,22600,22600,22600,22600,22600,
79 22600,22600,22600,22600,22600,22600,22600,22600,22600,22600,22600,22600,22600,22600,22600,
80 22600,22600,22600,22600,22600,22600,22600,22600,22600,22600,22600,22600,22600,22600,22600,
81 22600,22600,22600,22600,22600,22600,22600,22600,22600,22600,22600,22600,22600,22600,22600,
82 22700,22700,22700,22700,22700,22700,22700,22700,22700,22700,22700,22700,22700,22700,22700,
83 22700,22700,22700,22700,22700,22700,22700,22700,22700,22700,22700,22700,22700,22700,22700,
84 22700,22700,22700,22700,22700,22700,22700,22700,22700,22700,22700,22700,22700,22700,22700,
85 22700,22700,22700,22700,22700,22700,22700,22700,22700,22700,22700,22700,22600,22700,22700,
88 unsigned short cuthi[122]={22940,22940,22940,22940,22940,22940,22940,22940,22940,22940,22940,22940,22940,22940,22940,
89 22940,22940,22940,22940,22940,22940,22940,22940,22940,22940,22940,22940,22940,22940,22940,
90 22940,22940,22940,22940,22940,22940,22940,22940,22940,22940,22940,22940,22940,22940,22940,
91 22940,22960,22940,22940,22940,22940,22940,22940,22940,22940,22940,22940,22940,22940,22940,
92 23020,23020,23020,23020,23020,23020,23020,23070,23020,23020,23020,23020,23020,23020,23020,
93 23020,23020,23020,23020,23020,23020,23020,23020,23020,23020,23020,23020,23020,23020,23020,
94 23020,23020,23020,23020,23020,23020,23020,23020,23020,23040,23040,23020,23020,23020,23020,
95 23020,23020,23020,23020,23020,23020,23140,23020,23020,23020,23030,23030,23390,23020,23030,
99 for(
int i=0;i<NMAX+NVPDTRAY;i++) {
100 trg[i].trgWindow_Min = cutlow[i];
101 trg[i].trgWindow_Max = cuthi[i];
102 cout <<
" tray = " << i+1 <<
" min = " << trg[i].trgWindow_Min <<
" max = " << trg[i].trgWindow_Max << endl;
107 tofTrgWindow->
SetTable((
char*)trg, NMAX+NVPDTRAY);
109 dbManager->setStoreTime(ZStoreTime.Data());
111 cout<<
" here "<<endl;
112 dbManager->storeDbTable(tofTrgWindow);
113 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