00001
00002 class StChain;
00003 StChain *chain=0;
00004
00005
00006
00007 void StEztMaker(const Int_t nevents=100,
00008 const Char_t *path="/star/data44/reco/ppMinBias/ReversedFullField/P04ij/2004/112/",
00009 const Char_t *file="st_physics_5112018_raw_1020002.event.root",
00010 const Char_t* outDir="./",
00011 const Char_t* outFile="dummy",
00012 const Char_t* appendix="test.microDst")
00013 {
00014
00015
00016 const char *fileListQQ[]={0,0};
00017 if (path[0]=='-') {
00018 fileListQQ[0]=file;
00019 } else {
00020 fileListQQ[0] = gSystem->ConcatFileName(path,file);
00021 }
00022 StEztMaker(nevents,fileListQQ,outDir,outFile);
00023 }
00024
00025
00026 void StEztMaker(const Int_t nevents, const Char_t **fileList, const Char_t* dirName, const Char_t* fileName)
00027 {
00028 gROOT->Macro("$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
00029
00030 chain = new StChain("StChain");
00031 chain->SetDebug();
00032
00033
00034 StFile *setFiles= new StFile();
00035 for (int ifil=0; fileList[ifil]; ifil++)
00036 setFiles->AddFile(fileList[ifil]);
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046 StIOMaker* ioMaker = new StIOMaker("IOMaker","r",setFiles,"bfcTree");
00047 ioMaker->SetDebug();
00048
00049 ioMaker->SetIOMode("r");
00050 ioMaker->SetDebug();
00051 ioMaker->SetBranch("*",0,"0");
00052 ioMaker->SetBranch("eventBranch",0,"r");
00053 ioMaker->SetBranch("emcBranch",0,"r");
00054 ioMaker->SetBranch("runcoBranch",0,"r");
00055
00056
00057 StStrangeMuDstMaker* v0dst = new StStrangeMuDstMaker("strangeMuDst");
00058 v0dst->DoV0();
00059 v0dst->DoXi();
00060 v0dst->DoKink();
00061 v0dst->SetNoKeep();
00062
00063 StMuDstMaker* maker = new StMuDstMaker(1,1,dirName);
00064
00065
00066
00067
00068 maker->setProbabilityPidFile();
00069
00070 maker->SetStatus("*",0);
00071 maker->SetStatus("EztAll",1);
00072 StMuDebug::setLevel(0);
00073
00074 chain->Init();
00075 chain->PrintInfo();
00076 for (Int_t iev=0;iev<nevents; iev++) {
00077 cout << "StEztMaker -- Working on eventNumber " << iev << endl;
00078 chain->Clear();
00079 int iret = chain->Make(iev);
00080 if (iret) {
00081 cout << "Bad return code!" << endl;
00082 break;
00083 }
00084 }
00085 chain->Finish();
00086
00087 cout << " End of Analysis " << endl;
00088 }
00089
00090
00091