8 Int_t iEvt=0,istat=0,nEvents=0;
10 void doEvents(
const Char_t *inname,
const Char_t *histname,
const Char_t *ntuplename)
18 if (gClassTable->GetID(
"TTable") < 0) {
19 gSystem->Load(
"libStar");
20 gSystem->Load(
"libPhysics");
22 gROOT->LoadMacro(
"$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
23 loadSharedLibraries();
24 gSystem->Load(
"StarMagField");
25 gSystem->Load(
"StMagF");
26 gSystem->Load(
"StTpcDb");
28 gSystem->Load(
"StDaqLib");
29 gSystem->Load(
"StDbBroker");
30 gSystem->Load(
"StDetectorDbMaker");
31 gSystem->Load(
"StDbUtilities");
32 gSystem->Load(
"St_db_Maker");
34 gSystem->Load(
"StEvent");
35 gSystem->Load(
"StEventMaker");
36 gSystem->Load(
"StarMagField");
37 gSystem->Load(
"StTofUtil");
38 gSystem->Load(
"StTofMaker");
40 gSystem->Load(
"libtpc_Tables");
41 gSystem->Load(
"libGeom");
42 gSystem->Load(
"St_g2t");
43 gSystem->Load(
"geometry");
44 gSystem->Load(
"St_geant_Maker");
46 gSystem->Load(
"StTofrMatchMaker");
50 gSystem->Load(
"StTofrNtupleMaker");
57 ioMaker->SetFile(inname);
59 ioMaker->SetBranch(
"*",0,
"0");
60 ioMaker->SetBranch(
"eventBranch",0,
"r");
63 int NwGeant=5000000, IwType=0, NwPaw=0;
68 cout<<endl<<
"============ Data Base ========="<<endl;
69 dbMk =
new St_db_Maker(
"db",
"MySQL:StarDb",
"$STAR/StarDb",
"StarDb");
72 matchMaker->SetDebug(0);
73 matchMaker->SetMode(1);
74 matchMaker->setSaveGeometry(kTRUE);
75 matchMaker->setCreateHistoFlag(kTRUE);
76 matchMaker->setCreateTreeFlag(kTRUE);
77 matchMaker->setHistoFileName(histname);
80 tofrNtuple->SetDebug(0);
81 tofrNtuple->setInitGeomFromOther(kTRUE);
86 Int_t iInit = chain->Init();
87 if (iInit) chain->Fatal(iInit,
"on init");
93 EventLoop:
if (i <= nEvents && istat != 2) {
95 cout << endl <<
"============================ Event " << i
96 <<
" start ============================" << endl;
99 istat = chain->
Make(i);
101 {cout <<
"Last event processed. Status = " << istat << endl;}
103 {cout <<
"Error event processed. Status = " << istat << endl;}
111 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.