8 Int_t iEvt=0,istat=0,nEvents=0;
9 void doEvents(
const Char_t *inname =
"/star/institutions/lbl/dongx/tof/Run8/prod/9054010/reco/st_toftpx_9054010_raw_1370001.event.root",
10 const Char_t *histname =
"test.hist.root",
11 const Char_t *ntuplename =
"test.ntuple.root");
13 void doEvents(
const Char_t *inname,
const Char_t *histname,
const Char_t *ntuplename)
21 if (gClassTable->GetID(
"TTable") < 0) {
22 gSystem->Load(
"libStar");
23 gSystem->Load(
"libPhysics");
25 gROOT->LoadMacro(
"$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
26 loadSharedLibraries();
27 gSystem->Load(
"StarMagField");
28 gSystem->Load(
"StMagF");
29 gSystem->Load(
"StTpcDb");
31 gSystem->Load(
"StDaqLib");
32 gSystem->Load(
"StDbBroker");
33 gSystem->Load(
"StDetectorDbMaker");
34 gSystem->Load(
"StDbUtilities");
35 gSystem->Load(
"St_db_Maker");
37 gSystem->Load(
"StEvent");
38 gSystem->Load(
"StEventMaker");
39 gSystem->Load(
"StarMagField");
40 gSystem->Load(
"StTofUtil");
41 gSystem->Load(
"StTofMaker");
43 gSystem->Load(
"libtpc_Tables");
44 gSystem->Load(
"libGeom");
45 gSystem->Load(
"St_g2t");
46 gSystem->Load(
"geometry");
47 gSystem->Load(
"St_geant_Maker");
49 gSystem->Load(
"StTofrMatchMaker");
53 gSystem->Load(
"StTofrNtupleMaker");
60 ioMaker->SetFile(inname);
62 ioMaker->SetBranch(
"*",0,
"0");
63 ioMaker->SetBranch(
"eventBranch",0,
"r");
66 int NwGeant=5000000, IwType=0, NwPaw=0;
71 cout<<endl<<
"============ Data Base ========="<<endl;
72 dbMk =
new St_db_Maker(
"db",
"MySQL:StarDb",
"$STAR/StarDb",
"StarDb");
75 matchMaker->SetDebug(0);
76 matchMaker->SetMode(1);
77 matchMaker->setSaveGeometry(kTRUE);
78 matchMaker->setCreateHistoFlag(kTRUE);
79 matchMaker->setCreateTreeFlag(kTRUE);
80 matchMaker->setHistoFileName(histname);
83 tofrNtuple->SetDebug(0);
84 tofrNtuple->setInitGeomFromOther(kTRUE);
89 Int_t iInit = chain->Init();
90 if (iInit) chain->Fatal(iInit,
"on init");
96 EventLoop:
if (i <= nEvents && istat != 2) {
98 cout << endl <<
"============================ Event " << i
99 <<
" start ============================" << endl;
102 istat = chain->
Make(i);
104 {cout <<
"Last event processed. Status = " << istat << endl;}
106 {cout <<
"Error event processed. Status = " << istat << endl;}
114 cout<<endl<<
"============================ Event "<<i<<
" finish ============================"<<endl;
virtual void SetIOMode(Option_t *iomode="w")
number of transactions
virtual void Clear(Option_t *option="")
User defined functions.
virtual void SetActive(Bool_t k=kTRUE)
Setters for flags and switches.
virtual void LoadGeometry(const Char_t *option="detp geometry field_only")
Specifies GEANT3 geometry command.