26 const Int_t NCHAN = 192;
27 const Int_t NVPD = 19;
30 gSystem->Load(
"St_base");
31 gSystem->Load(
"StChain");
32 gSystem->Load(
"StUtilities");
33 gSystem->Load(
"St_Tables.so");
35 gSystem->Load(
"StDbLib.so");
36 gSystem->Load(
"libStDb_Tables.so");
42 StDbConfigNode* configNode = dbManager->initConfig(
"Calibrations_tof");
45 TString ZStoreTime =
"2008-11-01 00:00:00";
48 StDbTable* tofDaqMap = configNode->addDbTable(
"tofDaqMap");
51 tofDaqMap_st *daqmap =
new tofDaqMap_st[1];
53 Short_t Chan2M[24] = {1, 3, 2, 3, 2, 1, 2, 1,
54 3, 4, 1, 2, 4, 4, 1, 1,
55 4, 4, 3, 3, 2, 4, 3, 2};
59 Short_t Chan2C[24] = {4, 2, 3, 4, 5, 2, 1, 6,
60 6, 1, 3, 2, 3, 5, 1, 5,
61 6, 4, 5, 3, 4, 2, 1, 6};
63 Short_t Chan2MRPC[24], MRPC2Chan[24];
93 Short_t PMT2LeChan[38] = {142,122,118,98,46,26,22,2,112,101,
94 24,136,123,120,99,40,27,16,3,
95 142,122,118,98,46,26,22,2,112,101,
96 24,136,123,120,99,40,27,16,3};
97 Short_t PMT2TeChan[38] = {129,131,105,107,33,35,9,11,109,110,
98 39,133,132,135,108,37,36,13,12,
99 129,131,105,107,33,35,9,11,109,110,
100 39,133,132,135,108,37,36,13,12};
102 for(
int i=0;i<24;i++) {
103 Chan2MRPC[i] = (Chan2M[i] - 1)*6 + (Chan2C[i] - 1);
104 MRPC2Chan[Chan2MRPC[i]] = i;
107 for(
int i=0;i<24;i++) {
108 if(i%8==0) cout << endl;
109 cout <<
" " << MRPC2Chan[i];
119 cout <<
" West PMT 2 leading Tdc " << endl;
120 for(
int i=0;i<19;i++) cout <<
" " << PMT2LeChan[i];
122 cout <<
" West PMT 2 trailing Tdc " << endl;
123 for(
int i=0;i<19;i++) cout <<
" " << PMT2TeChan[i];
126 cout <<
" East PMT 2 leading Tdc " << endl;
127 for(
int i=19;i<38;i++) cout <<
" " << PMT2LeChan[i];
129 cout <<
" West PMT 2 trailing Tdc " << endl;
130 for(
int i=19;i<38;i++) cout <<
" " << PMT2TeChan[i];
134 for(
int i=0;i<NCHAN;i++) {
138 daqmap[0].MRPC2TDIGChanMap[i] = iboard*24 + MRPC2Chan[ii];
141 for(
int i=0;i<50;i++) {
143 daqmap[0].PMT2TDIGLeChanMap[i] = PMT2LeChan[i];
144 daqmap[0].PMT2TDIGTeChanMap[i] = PMT2TeChan[i];
146 daqmap[0].PMT2TDIGLeChanMap[i] = -1;
147 daqmap[0].PMT2TDIGTeChanMap[i] = -1;
153 tofDaqMap->
SetTable((
char*)daqmap, 1);
155 dbManager->setStoreTime(ZStoreTime.Data());
157 cout<<
" here "<<endl;
158 dbManager->storeDbTable(tofDaqMap);
159 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