00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 void lasertest_single(TString filename,int ftpc, int lsec, int straight, int gfit, char* t0, char* gas, float gastemp, float mbfield)
00038 {
00039
00040 Int_t minz, maxz;
00041 Int_t minrad = 0;
00042 Int_t maxrad = 30;
00043
00044 cout<<"Starting lasertest_single.C:"<<endl;
00045 cout<<" filename = "<<filename<<".root"<<endl;
00046 cout<<" ftpc = "<<ftpc;
00047 if ( ftpc == 1 ) cout<<" FTPC West"<<endl;
00048 if ( ftpc == 2 ) cout<<" FTPC East"<<endl;
00049 cout<<" lsec = "<<lsec<<endl;
00050 cout<<" straight = "<<straight<<endl;
00051 cout<<" gfit = "<<gfit<<endl;
00052
00053 if ( ftpc == 1 ) {
00054 minz = 0;
00055 maxz = 300;
00056 }
00057
00058 if ( ftpc == 2 ) {
00059 minz = -300;
00060 maxz = 0;
00061 }
00062 cout<<" minz = "<<minz<<endl;
00063 cout<<" maxz = "<<maxz<<endl;
00064 cout<<" minrad = "<<minrad<<endl;
00065 cout<<" maxrad = "<<maxrad<<endl;
00066 cout<<" t0 = "<<t0<<endl;
00067 cout<<" gas = "<<gas<<endl;
00068 cout<<" gastemp = "<<gastemp<<endl;
00069 cout<<" mbfield = "<<mbfield<<endl;
00070 cout<<endl;
00071
00072 if (gClassTable->GetID("TTable") < 0) gSystem->Load("libStar");
00073
00074 gSystem->Load("libMinuit.so");
00075 gSystem->Load("libSpectrum.so");
00076
00077 gSystem->Load("St_base");
00078 gSystem->Load("StChain");
00079
00080 gSystem->Load("libtpc_Tables");
00081
00082 gSystem->Load("StStarLogger");
00083 gSystem->Load("StUtilities");
00084 gSystem->Load("StarClassLibrary");
00085 gSystem->Load("StEvent");
00086 gSystem->Load("StarMagField");
00087 gSystem->Load("StMagF");
00088
00089 gSystem->Load("libStDb_Tables.so");
00090 gSystem->Load("StDetectorDbMaker.so");
00091 gSystem->Load("StTpcDb");
00092 gSystem->Load("StDbUtilities");
00093 gSystem->Load("StDbLib.so");
00094 gSystem->Load("StDbBroker.so");
00095 gSystem->Load("libStDb_Tables.so");
00096 gSystem->Load("St_db_Maker.so");
00097
00098 gSystem->Load("StFtpcCalibMaker");
00099 gSystem->Load("libftpc_Tables");
00100 gSystem->Load("StFtpcClusterMaker");
00101 gSystem->Load("StFtpcTrackMaker");
00102
00103
00104 const char *mysqlDB = "MySQL:StarDb";
00105 const char *paramsDB = "$STAR/StarDb";
00106
00107
00108 StChain *chain = new StChain();
00109
00110 StFtpcCalibMaker *laser=new StFtpcCalibMaker();
00111
00112 laser->GetRunInfo(filename);
00113 cout<<" run = "<<laser->RunNum()<<" date = "<<laser->Date()<<" time = "<<laser->Time()<<endl;
00114
00115 St_db_Maker *dbMk = new St_db_Maker("db",mysqlDB,paramsDB);
00116 dbMk->SetDateTime(laser->Date(),laser->Time());
00117
00118 Bool_t laserRun = kTRUE;
00119
00120 dbMk->InitRun(laser->RunNum());
00121 dbMk->Init();
00122 dbMk->Make();
00123
00124 cout<<"dbDate = "<<dbMk->GetDateTime().GetDate()<<endl;
00125 cout<<"After Database init !!!"<<endl;
00126 cout<<endl;
00127
00128 if (laser->DbInit(mbfield) == kStWarn) {
00129 delete laser;
00130 break;
00131 }
00132
00133 laser->DoLaserCalib(filename,ftpc,lsec,straight,gfit,minz,maxz,minrad,maxrad,t0,gas,gastemp,mbfield);
00134
00135 delete laser;
00136 }