6 void DoMatch(Int_t nevents=110){
8 char *fname=
"/star/data22/MC/balewski/dAu_MC/rcf1197_95_5899evts-a*.event.root";
9 TString miniF=
"dAu1K.eeTree";
14 gSystem->Load(
"St_base");
15 gSystem->Load(
"StChain");
16 gSystem->Load(
"libglobal_Tables");
17 gSystem->Load(
"libsim_Tables");
18 gSystem->Load(
"libgen_Tables");
19 gSystem->Load(
"St_Tables");
20 gSystem->Load(
"StDbLib");
21 gSystem->Load(
"StDbBroker");
22 gSystem->Load(
"St_db_Maker");
23 gSystem->Load(
"StUtilities");
24 gSystem->Load(
"StIOMaker");
25 gSystem->Load(
"StMagF");
26 gSystem->Load(
"StarClassLibrary");
27 gSystem->Load(
"StAnalysisUtilities");
28 gSystem->Load(
"StEvent");
29 gSystem->Load(
"StTpcDb");
30 gSystem->Load(
"StEventMaker");
31 gSystem->Load(
"StMcEvent");
32 gSystem->Load(
"StMcEventMaker");
33 gSystem->Load(
"libgeometry_Tables");
34 gSystem->Load(
"StEmcUtil");
38 gSystem->Load(
"StEEmcUtil");
42 TFile *f =
new TFile(miniF+
".root");
44 TTree *t4 = (TTree*)f->Get(
"EEtree");
51 TBranch *br = t4->GetBranch(
"EEdst");
52 br->SetAddress(&event);
53 Int_t nevent = (Int_t)t4->GetEntries();
55 printf(
"\n\n XXXXXXXXXXXXXXXXXXXXXXXXXX eeTree - events XXXXXXXXXX\n");
57 for (Int_t ie=0;ie<nevent;ie++) {
58 if(ie>=nevents)
break;
62 printf(
"\niEve=%d ---------- ID=%d token=%d timeSTamp=%d\n",ie,event->ID,event->token,event->timeStamp);
65 printf(
"XXXXXXXXXXXXXXXXXXXXXXXXXX eeTree - done XXXXXXXXXX\n\n");
70 ioMaker->SetFile(fname);
73 ioMaker->SetBranch(
"*",0,
"0");
74 ioMaker->SetBranch(
"geantBranch",0,
"r");
75 ioMaker->SetBranch(
"eventBranch",0,
"r");
82 Int_t initStat = chain->Init();
83 if (initStat) chain->Fatal(initStat,
"during Init()");
87 printf(
" XXXXXXXXXXXXXXXXXXXXXXXXXX StEvent - events XXXXXXXXXX\n");
90 if (iev<=nevents && istat!=2)
93 cout <<
"---------------------- Processing Event : " << iev <<
" ----------------------" << endl;
94 istat = chain->
Make(iev);
96 printf(
"StEvent time=%d, ID=%d, runID=%d\n",(
int)stEvent->time(),(int)stEvent->id(),(int)stEvent->runId());
99 printf(
"EvtHddr actual event time stamp= %d, yyyy/mm/dd=%d hh/mm/ss=%d\n",
100 (
int)fEvtHddr->GetUTime(),fEvtHddr->GetDate(),fEvtHddr->GetTime());
107 if (istat == 2) { cout <<
"Last Event Processed. Status = " << istat << endl; }
108 if (istat == 3) { cout <<
"Error Event Processed. Status = " << istat << endl; }
virtual void SetIOMode(Option_t *iomode="w")
number of transactions
virtual void Clear(Option_t *option="")
User defined functions.
virtual void ls(Option_t *option="") const