00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #include <iostream>
00016 #include <fstream>
00017 #include <string>
00018 #include <iomanip>
00019 using namespace std;
00020
00021
00022 void storetofGeomAlign()
00023
00024
00025 {
00026
00027
00028
00029
00030 const Int_t NTRAY = 94;
00031 const Int_t NVPDTRAY = 2;
00032 const Int_t NMAX = 120;
00033
00034
00035 gSystem->Load("St_base");
00036 gSystem->Load("StChain");
00037 gSystem->Load("StUtilities");
00038 gSystem->Load("St_Tables.so");
00039
00040 gSystem->Load("StDbLib.so");
00041 gSystem->Load("libStDb_Tables.so");
00042
00043
00044 StDbManager* dbManager = StDbManager::Instance();
00045
00046
00047 StDbConfigNode* configNode = dbManager->initConfig("Calibrations_tof");
00048
00049
00050 TString ZStoreTime = "2007-11-01 00:00:00";
00051
00052
00053
00054 StDbTable* tofGeomAlign = configNode->addDbTable("tofGeomAlign");
00055
00056
00057 tofGeomAlign_st *tofAlign = new tofGeomAlign_st[NMAX];
00058
00059
00060 for(int i=0;i<NMAX;i++) {
00061 int trayId = i+1;
00062 tofAlign[i].x0 = 0.;
00063 tofAlign[i].phi0 = 0.;
00064 tofAlign[i].z0 = 0.;
00065 tofAlign[i].angle0 = 0.;
00066 if(trayId<76||trayId>80) continue;
00067 tofAlign[i].z0 = -0.5;
00068 }
00069
00070
00071
00072 tofGeomAlign->SetTable((char*)tofAlign, NMAX);
00073
00074 dbManager->setStoreTime(ZStoreTime.Data());
00075
00076 cout<<" here "<<endl;
00077 dbManager->storeDbTable(tofGeomAlign);
00078 cout<<"uploaded"<<endl;
00079
00080 }