StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
t0_single.C
1 // $Id: t0_single.C,v 1.5 2009/12/09 14:41:49 jcs Exp $
2 //
3 // $Log: t0_single.C,v $
4 // Revision 1.5 2009/12/09 14:41:49 jcs
5 // delta_t0 and delta_gas can now both = 0
6 //
7 // Revision 1.4 2008/05/15 21:05:55 jcs
8 // load StDetectorDbMaker.so
9 //
10 // Revision 1.3 2006/04/05 08:50:36 jcs
11 // set t0 = ".000001" if t0 = "0" and gas = "0" to avoid seg fault
12 //
13 // Revision 1.2 2006/03/15 15:14:06 jcs
14 // add lines for listing CVS update info
15 //
16 
17 void t0_single(TString filename, char* t0, char* gas,float mbfield)
18 {
19 
20 
21  cout<<"Starting t0_single.C:"<<endl;
22  cout<<" filename = "<<filename<<".root"<<endl;
23  cout<<" t0 = "<<t0<<endl;
24  cout<<" gas = "<<gas<<endl;
25  cout<<" mbfield = "<<mbfield<<endl;
26  cout<<endl;
27 
28  if (gClassTable->GetID("TTable") < 0) gSystem->Load("libStar");
29  gSystem->Load("St_base");
30  gSystem->Load("StChain");
31  gSystem->Load("St_Tables");
32  gSystem->Load("StUtilities");
33  gSystem->Load("StarMagField");
34  gSystem->Load("StMagF");
35  gSystem->Load("StDetectorDbMaker.so");
36  gSystem->Load("StDbLib");
37  gSystem->Load("StDbBroker");
38  gSystem->Load("St_db_Maker");
39  gSystem->Load("StarClassLibrary");
40  gSystem->Load("StDbUtilities");
41  gSystem->Load("StFtpcCalibMaker");
42  gSystem->Load("libftpc_Tables");
43  gSystem->Load("StFtpcClusterMaker");
44  gSystem->Load("StMagF");
45 
46  // Create the makers to be called by the current chain
47  const char *mysqlDB = "MySQL:StarDb";
48  const char *paramsDB = "$STAR/StarDb";
49  //const char *paramsDB = "$PWD/StarDb";
50 
52  laser->GetRunInfo(filename);
53  cout<<" date = "<<laser->Date()<<" time = "<<laser->Time()<<endl;
54 
55  St_db_Maker *dbMk = new St_db_Maker("db",mysqlDB,paramsDB);
56  dbMk->SetDateTime(laser->Date(),laser->Time());
57 
58  dbMk->Init();
59  dbMk->Make();
60 
61  cout<<"dbDate = "<<dbMk->GetDateTime().GetDate()<<endl;
62  cout<<"After Database init !!!"<<endl;
63  cout<<endl;
64 
65  if (laser->DbInit(mbfield) == kStWarn) {
66  delete laser;
67  break;
68  }
69 
70  laser->DoT0Calib(filename,t0,gas,mbfield);
71 
72  delete laser;
73 }
virtual Int_t DbInit(float mbfield)
The FTPC calibration maker.
virtual Int_t Make()
void DoT0Calib(TString filename, char *t0, char *gas, float mbfield)
Definition: Stypes.h:42