59 const char *dstFile = 0;
60 const char *fileList[] = {dstFile, 0};
62 void doFlowEvents(Int_t,
const Char_t **,
const char *qaflag =
"",
63 const Int_t wrStEOut = 0);
64 void doFlowEvents(Int_t,
const Char_t *,
const Char_t *,
65 const char *qaflag =
"off",
const Int_t wrStEOut = 0);
66 void doFlowEvents(Int_t nevents = 2);
70 void doFlowEvents(Int_t nevents,
const Char_t **fileList,
const char *qaflag,
73 cout << endl << endl <<
" doFlowEvents - input # events = " << nevents << endl;
75 while (fileList[ilist]){
76 cout <<
" doFlowEvents - input fileList = " << fileList[ilist] << endl;
79 cout <<
" doFlowEvents - input qaflag = " << qaflag << endl;
80 cout <<
" doFlowEvents - input wrStEOut = " << wrStEOut << endl << endl << endl;
86 gSystem->Load(
"St_base");
87 gSystem->Load(
"StChain");
89 gSystem->Load(
"libgen_Tables");
90 gSystem->Load(
"libsim_Tables");
91 gSystem->Load(
"libglobal_Tables");
93 gSystem->Load(
"StUtilities");
94 gSystem->Load(
"StIOMaker");
95 gSystem->Load(
"StTreeMaker");
96 gSystem->Load(
"StarClassLibrary");
97 gSystem->Load(
"StEvent");
98 gSystem->Load(
"StEventUtilities");
99 gSystem->Load(
"StMagF");
101 gSystem->Load(
"StFlowMaker");
102 gSystem->Load(
"PIDFitter");
104 gSystem->Load(
"StStrangeMuDstMaker");
105 gSystem->Load(
"StMuDSTMaker");
108 chain =
new StChain(
"StChain");
113 setFiles =
new StFile(fileList);
115 gSystem->Load(
"StChallenger");
116 setFiles = StChallenger::Challenge();
117 setFiles->SetDebug();
118 const char *Argv[]= {
120 "-q",
"n_trk_tpc[0]>1000 && n_trk_tpc[1]>1000",
121 "-c",
"/afs/rhic.bnl.gov/star/incoming/GCA/daq/stacs.rc"
123 Int_t Argc=
sizeof(Argv)/4;
124 setFiles->Init(Argc,Argv);
147 if (strstr(fileList[0],
".dst.root")) {
150 gSystem->Load(
"StEventMaker");
152 if (fileList && fileList[0] && strstr(fileList[0],
".root")) {
153 mainBranch = fileList[0];
154 mainBranch.ReplaceAll(
".root",
"");
155 int idot = strrchr((
char*)mainBranch,
'.') - mainBranch.Data();
156 mainBranch.Replace(0,idot+1,
"");
157 mainBranch+=
"Branch";
161 IOMk->SetBranch(
"*", 0,
"0");
162 if (!mainBranch.IsNull()) IOMk->SetBranch(mainBranch,0,
"r");
173 cout <<
"doFlowEvents - will write out .event.root file" << endl << endl;
176 outMk->SetBranch(
"eventBranch",
"test.event.root",
"w");
177 outMk->IntoBranch(
"eventBranch",
"StEvent");
180 }
else if (strstr(fileList[0],
"picoevent.root")) {
187 flowMaker->PicoEventRead(kTRUE);
188 flowMaker->SetPicoEventFileName(setFiles);
190 }
else if (strstr(fileList[0],
"MuDst.root")) {
193 if (makerName[0]==
'\0') {
198 flowMaker->MuEventRead(kTRUE);
199 flowMaker->SetMuEventFileName(setFiles);
202 }
else if (strstr(fileList[0],
".event.root")) {
207 IOMk->SetBranch(
"*", 0,
"0");
208 IOMk->SetBranch(
"eventBranch", 0,
"r");
217 cout <<
" doFlowEvents - unknown file name = " << fileList[0] << endl;
229 if (makerName[0]==
'\0') {
232 sprintf(makerName,
"PidAmp");
236 pidAmpMaker->SetMultBinNumber(0);
243 Int_t iInit = chain->Init();
244 if (iInit) chain->Fatal(iInit,
"on init");
267 StFlowCutEvent::SetMult(10, 250);
280 StFlowCutTrack::SetFitPtsTpc(0, 0);
281 StFlowCutTrack::SetFitPtsFtpc(0, 0);
282 StFlowCutTrack::SetFitOverMaxPts(0., 0.);
283 StFlowCutTrack::SetChiSqTpc(0., 0.);
336 int istat = 0, i = 1;
337 EventLoop:
if (i <= nevents && istat != 2) {
339 cout << endl <<
"============================ Event " << i
340 <<
" start ============================" << endl;
343 istat = chain->
Make(i);
345 {cout <<
"Last event processed. Status = " << istat << endl;}
347 {cout <<
"Error event processed. Status = " << istat << endl;}
386 cout << endl <<
"============================ Event " << i
387 <<
" finish ============================" << endl;
407 void doFlowEvents(
const Int_t nevents,
const Char_t *path,
const Char_t *file,
const char *qaflag,
const Int_t wrStEOut)
409 const char *fileListQQ[] = {0,0};
410 if (strncmp(path,
"GC", 2) == 0) {
412 }
else if (path[0] ==
'-') {
413 fileListQQ[0] = file;
415 fileListQQ[0] = gSystem->ConcatFileName(path,file);
418 doFlowEvents(nevents, fileListQQ, qaflag, wrStEOut);
422 void doFlowEvents(
const Int_t nevents)
425 const Char_t *filePath=
"-";
426 const Char_t *fileExt=
"/afs/rhic.bnl.gov/star/data/samples/gstar.dst.root";
447 doFlowEvents(nevents, filePath, fileExt);
virtual void SetIOMode(Option_t *iomode="w")
number of transactions
virtual void Clear(Option_t *option="")
User defined functions.