00001
00002
00003 class StChain;
00004 StChain *chain=0;
00005
00006 void DoTrigSimu(Int_t nevents=5,char *fname="minb200-10k.event.root")
00007 {
00008 char *fname="st_physics_4095050_raw_0010002.event.root";
00009
00010
00011
00012 gSystem->Load("St_base");
00013 gSystem->Load("StChain");
00014 gSystem->Load("libglobal_Tables");
00015 gSystem->Load("libsim_Tables");
00016 gSystem->Load("libgen_Tables");
00017 gSystem->Load("St_Tables");
00018 gSystem->Load("StDbLib");
00019 gSystem->Load("StDbBroker");
00020 gSystem->Load("St_db_Maker");
00021 gSystem->Load("StUtilities");
00022 gSystem->Load("StIOMaker");
00023 gSystem->Load("StMagF");
00024 gSystem->Load("StarClassLibrary");
00025 gSystem->Load("StAnalysisUtilities");
00026 gSystem->Load("StEvent");
00027 gSystem->Load("StTpcDb");
00028 gSystem->Load("StEventMaker");
00029 gSystem->Load("StMcEvent");
00030 gSystem->Load("StMcEventMaker");
00031 gSystem->Load("libgeometry_Tables");
00032 gSystem->Load("StEmcUtil");
00033
00034
00035 gSystem->Load("StEEmcDbMaker");
00036 gSystem->Load("StEEmcUtil");
00037 gSystem->Load("StEEmcSimulatorMaker");
00038
00039
00040 chain = new StChain("bfc");
00041
00042
00043
00044
00045
00046 StIOMaker* ioMaker = new StIOMaker();
00047
00048 ioMaker->SetFile(fname);
00049
00050 ioMaker->SetIOMode("r");
00051 ioMaker->SetBranch("*",0,"0");
00052 ioMaker->SetBranch("geantBranch",0,"r");
00053 ioMaker->SetBranch("eventBranch",0,"r");
00054 ioMaker->SetIOMode("r");
00055
00056
00057 StMcEventMaker *mcEventMaker = new StMcEventMaker();
00058
00059
00060
00061 StEEmcTrigSimuMaker *myMk2=new StEEmcTrigSimuMaker("eemcTrigMaker");
00062
00063
00064 chain->PrintInfo();
00065 chain->ls(3);
00066 Int_t initStat = chain->Init();
00067 if (initStat) chain->Fatal(initStat, "during Init()");
00068
00069 int istat=0,iev=1;
00070
00071
00072 EventLoop:
00073 if (iev<=nevents && istat!=2)
00074 {
00075 chain->Clear();
00076 cout << "---------------------- Processing Event : " << iev << " ----------------------" << endl;
00077 istat = chain->Make(iev);
00078 if (istat == 2) { cout << "Last Event Processed. Status = " << istat << endl; }
00079 if (istat == 3) { cout << "Error Event Processed. Status = " << istat << endl; }
00080 iev++;
00081
00082
00083 goto EventLoop;
00084 }
00085 chain->Finish();
00086
00087 delete myMk2;
00088 delete myMk1;
00089
00090 f.Write();
00091
00092
00093 printf("\n\n============== and of fill for EEMC FEE tree=========\n\n");
00094
00095 }
00096
00097
00098
00099
00100