00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 class StChain;
00017 StChain *chain=0;
00018 void ProcessQQ(const Int_t, const Int_t, const Char_t **, const Char_t*, const Char_t* );
00019
00020
00021
00022 void StMuDstMakerYear1(const Int_t mode=0,
00023 const Int_t nevents=10,
00024 const Char_t *path="/star/data13/reco/dev/2001/10/",
00025 const Char_t *file="st_physics_2304060_raw_0303.event.root",
00026 const Char_t* outDir="./")
00027 {
00028 cout << "Backward compatibility method. Please, use 6 arguments ... " << endl;
00029 StMuDstMakerYear1(mode,0,nevents,path,file,outDir);
00030 }
00031
00032 void StMuDstMakerYear1(const Int_t mode=0,
00033 const Int_t fsti=0,
00034 const Int_t nevents=10,
00035 const Char_t *path="/star/data13/reco/dev/2001/10/",
00036 const Char_t *file="st_physics_2304060_raw_0303.event.root",
00037 const Char_t* outDir="./")
00038 {
00039
00040 const char *fileListQQ[]={0,0};
00041
00042 if (path[0]=='-') {
00043 fileListQQ[0]=file;
00044 } else {
00045 fileListQQ[0] = gSystem->ConcatFileName(path,file);
00046 }
00047 ProcessQQ(mode,fsti,nevents,fileListQQ,outDir);
00048 }
00049
00050
00051
00052 void ProcessQQ(const Int_t mode, const Int_t fsti, const Int_t nevents,
00053 const Char_t **fileList, const Char_t* dirName)
00054 {
00055 cout << "Loading libraries ..." << endl;
00056 gSystem->Load("St_base");
00057 gSystem->Load("StChain");
00058 gSystem->Load("StDaqLib");
00059 gSystem->Load("St_Tables");
00060 gSystem->Load("StMagF");
00061 gSystem->Load("StUtilities");
00062 gSystem->Load("StTreeMaker");
00063 gSystem->Load("StIOMaker");
00064 gSystem->Load("StarClassLibrary");
00065 gSystem->Load("StTpcDb");
00066 gSystem->Load("StDbUtilities");
00067 gSystem->Load("StEvent");
00068 gSystem->Load("StEventUtilities");
00069 gSystem->Load("StMcEvent");
00070 gSystem->Load("StMcEventMaker");
00071 gSystem->Load("StAssociationMaker");
00072
00073
00074
00075 cout << " EMC mode enabled" << endl;
00076 gSystem->Load("StEmcUtil");
00077 gSystem->Load("StDbLib");
00078 gSystem->Load("StDbBroker");
00079 gSystem->Load("St_db_Maker");
00080
00081
00082 if( mode & 0x4){
00083
00084 cout << " RICH mode enabled" << endl;
00085 gSystem->Load("StRrsMaker");
00086 gSystem->Load("StRchMaker");
00087 gSystem->Load("StRichPIDMaker");
00088 gSystem->Load("StRichSpectraMaker");
00089 }
00090
00091 gSystem->Load("StMcAnalysisMaker");
00092 gSystem->Load("StStrangeMuDstMaker");
00093 gSystem->Load("StMuDSTMaker");
00094
00095 if( mode & 0x2 ){
00096
00097 gSystem->Load("StEmcADCtoEMaker");
00098 gSystem->Load("StPreEclMaker");
00099 gSystem->Load("StEpcMaker");
00100 }
00101 cout << "Loading done " << endl;
00102
00103
00104 chain = new StChain("StChain");
00105 chain->SetDebug();
00106
00107
00108 StFile *setFiles= new StFile();
00109 for (int ifil=0; fileList[ifil]; ifil++)
00110 setFiles->AddFile(fileList[ifil]);
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120 StIOMaker* ioMaker = new StIOMaker("IOMaker","r",setFiles,"bfcTree");
00121 ioMaker->SetDebug();
00122
00123 ioMaker->SetIOMode("r");
00124 ioMaker->SetDebug();
00125 ioMaker->SetBranch("*",0,"0");
00126 ioMaker->SetBranch("eventBranch",0,"r");
00127 ioMaker->SetBranch("emcBranch",0,"r");
00128 ioMaker->SetBranch("runcoBranch",0,"r");
00129
00130
00131
00132
00133
00134
00135
00136 StStrangeMuDstMaker* v0dst = new StStrangeMuDstMaker("strangeMuDst");
00137 v0dst->DoV0();
00138 v0dst->DoXi();
00139 v0dst->DoKink();
00140 v0dst->SetNoKeep();
00141
00142
00143 if( mode & 0x4 ){
00144 StRichSpectraMaker* spectraMaker = new StRichSpectraMaker("spectraMaker");
00145 }
00146
00147 StAddRunInfoMaker* addRunInfoMaker = new StAddRunInfoMaker();
00148
00149 StMuDstMaker* maker = new StMuDstMaker(1,1,dirName);
00150
00151
00152 maker->setProbabilityPidFile();
00153
00154 StMuL3Filter* l3Filter = new StMuL3Filter(); maker->setL3TrackFilter(l3Filter);
00155 StMuFilter* filter = new StMuFilter(); maker->setTrackFilter(filter);
00156
00157
00158 if( mode & 0x2){
00159 St_db_Maker *dbMk = new St_db_Maker("StarDb","MySQL:StarDb");
00160 StEmcADCtoEMaker *adc = new StEmcADCtoEMaker();
00161 StPreEclMaker *pre = new StPreEclMaker();
00162 StEpcMaker *epc = new StEpcMaker();
00163 StEmcMicroDstMaker *write = new StEmcMicroDstMaker();
00164 write->setOutputDir(dirName);
00165 }
00166
00167
00168 if ( fsti == 1){
00169
00170 filter->addEncodedMethod(263);
00171 }
00172
00173
00174
00175
00176 chain->Init();
00177 chain->PrintInfo();
00178
00179
00180 Int_t iev=0;
00181 for ( ; iev < nevents ; iev++) {
00182 cout << "-----> Working on eventNumber " << iev << endl;
00183 chain->Clear();
00184 int iret = chain->Make(iev);
00185 if (iret) {
00186 cout << "Bad return code!" << endl;
00187 break;
00188 }
00189 }
00190 chain->Finish();
00191
00192 iev--;
00193 cout << endl << "******************* Last event processed = " << iev << endl;
00194 }
00195