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("StarMagField");
00061 gSystem->Load("StMagF");
00062 gSystem->Load("StUtilities");
00063 gSystem->Load("StTreeMaker");
00064 gSystem->Load("StIOMaker");
00065 gSystem->Load("StarClassLibrary");
00066 gSystem->Load("StDetectorDbMaker");
00067 gSystem->Load("StTpcDb");
00068 gSystem->Load("StDbUtilities");
00069 gSystem->Load("StBichsel");
00070 gSystem->Load("StTriggerDataMaker");
00071 gSystem->Load("StEvent");
00072 gSystem->Load("StEventUtilities");
00073 gSystem->Load("StMcEvent");
00074 gSystem->Load("StMcEventMaker");
00075 gSystem->Load("StAssociationMaker");
00076
00077
00078
00079 cout << " EMC mode enabled" << endl;
00080 gSystem->Load("StEmcUtil");
00081 gSystem->Load("StDbLib");
00082 gSystem->Load("StDbBroker");
00083 gSystem->Load("St_db_Maker");
00084
00085
00086 if( mode & 0x4){
00087
00088 cout << " RICH mode enabled" << endl;
00089 gSystem->Load("StRrsMaker");
00090 gSystem->Load("StRchMaker");
00091 gSystem->Load("StRichPIDMaker");
00092 gSystem->Load("StRichSpectraMaker");
00093 }
00094
00095 gSystem->Load("StMcAnalysisMaker");
00096 gSystem->Load("StStrangeMuDstMaker");
00097 gSystem->Load("StMuDSTMaker");
00098
00099 if( mode & 0x2 ){
00100
00101 gSystem->Load("StEmcADCtoEMaker");
00102 gSystem->Load("StPreEclMaker");
00103 gSystem->Load("StEpcMaker");
00104 }
00105 cout << "Loading done " << endl;
00106
00107
00108 chain = new StChain("StChain");
00109 chain->SetDebug();
00110
00111
00112 StFile *setFiles= new StFile();
00113 for (int ifil=0; fileList[ifil]; ifil++)
00114 setFiles->AddFile(fileList[ifil]);
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124 StIOMaker* ioMaker = new StIOMaker("IOMaker","r",setFiles,"bfcTree");
00125 ioMaker->SetDebug();
00126
00127 ioMaker->SetIOMode("r");
00128 ioMaker->SetDebug();
00129 ioMaker->SetBranch("*",0,"0");
00130 ioMaker->SetBranch("eventBranch",0,"r");
00131 ioMaker->SetBranch("emcBranch",0,"r");
00132 ioMaker->SetBranch("runcoBranch",0,"r");
00133
00134
00135
00136
00137
00138
00139
00140 StStrangeMuDstMaker* v0dst = new StStrangeMuDstMaker("strangeMuDst");
00141 v0dst->DoV0();
00142 v0dst->DoXi();
00143 v0dst->DoKink();
00144 v0dst->SetNoKeep();
00145
00146
00147 if( mode & 0x4 ){
00148 StRichSpectraMaker* spectraMaker = new StRichSpectraMaker("spectraMaker");
00149 }
00150
00151 StAddRunInfoMaker* addRunInfoMaker = new StAddRunInfoMaker();
00152
00153 StMuDstMaker* maker = new StMuDstMaker(1,1,dirName);
00154
00155
00156 maker->setProbabilityPidFile();
00157
00158 StMuL3Filter* l3Filter = new StMuL3Filter(); maker->setL3TrackFilter(l3Filter);
00159 StMuFilter* filter = new StMuFilter(); maker->setTrackFilter(filter);
00160
00161
00162 if( mode & 0x2){
00163 St_db_Maker *dbMk = new St_db_Maker("StarDb","MySQL:StarDb");
00164 StEmcADCtoEMaker *adc = new StEmcADCtoEMaker();
00165 StPreEclMaker *pre = new StPreEclMaker();
00166 StEpcMaker *epc = new StEpcMaker();
00167 StEmcMicroDstMaker *write = new StEmcMicroDstMaker();
00168 write->setOutputDir(dirName);
00169 }
00170
00171
00172 if ( fsti == 1){
00173
00174 filter->addEncodedMethod(263);
00175 }
00176
00177
00178
00179
00180 chain->Init();
00181 chain->PrintInfo();
00182
00183
00184 Int_t iev=0;
00185 for ( ; iev < nevents ; iev++) {
00186 cout << "-----> Working on eventNumber " << iev << endl;
00187 chain->Clear();
00188 int iret = chain->Make(iev);
00189 if (iret) {
00190 cout << "Bad return code!" << endl;
00191 break;
00192 }
00193 }
00194 chain->Finish();
00195
00196 iev--;
00197 cout << endl << "******************* Last event processed = " << iev << endl;
00198 }
00199