00001
00002 class StChain;
00003 StChain *chain=0;
00004
00005
00006
00007
00008
00009 void StEventReadTest(const Char_t *file="/star/data16/reco/dAuMinBias/ReversedFullField/P03ia/2003/019/st_physics_4019019_raw_0040020.event.root")
00010 {
00011
00012 gSystem->Load("libTable");
00013 gSystem->Load("libPhysics");
00014 gSystem->Load("St_base");
00015 gSystem->Load("StChain");
00016 gSystem->Load("St_Tables");
00017 gSystem->Load("StUtilities");
00018 gSystem->Load("StTreeMaker");
00019 gSystem->Load("StIOMaker");
00020 gSystem->Load("StarClassLibrary");
00021 gSystem->Load("StTriggerDataMaker");
00022 gSystem->Load("StBichsel");
00023 gSystem->Load("StEvent");
00024 gSystem->Load("StEventUtilities");
00025 gSystem->Load("StEmcUtil");
00026 gSystem->Load("StPreEclMaker");
00027 gSystem->Load("StStrangeMuDstMaker");
00028 gSystem->Load("StMuDSTMaker");
00029 cout << " loading of shared libraries done" << endl;
00030
00031 chain = new StChain("StChain");
00032 chain->SetDebug();
00033
00034 StFile *setFiles= new StFile();
00035 setFiles->AddFile(file);
00036
00037
00038
00039
00040
00041
00042
00043
00044 StIOMaker* ioMaker = new StIOMaker("IOMaker","r",setFiles,"bfcTree");
00045 ioMaker->SetDebug();
00046
00047 ioMaker->SetIOMode("r");
00048 ioMaker->SetDebug();
00049 ioMaker->SetBranch("*",0,"0");
00050 ioMaker->SetBranch("eventBranch",0,"r");
00051 ioMaker->SetBranch("emcBranch",0,"r");
00052 ioMaker->SetBranch("runcoBranch",0,"r");
00053
00054
00055
00056
00057 chain->Init();
00058 chain->PrintInfo();
00059 int iret=0;
00060 int iev=0;
00061 while (iret==0 && iev++ <10) {
00062 cout << "StExample -- Working on eventNumber " << iev++ << endl;
00063 chain->Clear();
00064 iret = chain->Make(iev);
00065 }
00066 chain->Finish();
00067
00068 cout << " End of Analysis " << endl;
00069 }
00070
00071
00072