58 class StEventDisplayMaker;
59 StEventDisplayMaker *dsMaker = 0;
62 const char *dstFile = 0;
63 const char *xdfFile = 0;
64 const char *mdcFile = 0;
65 const char *fileList[] = {dstFile,xdfFile,mdcFile,0};
69 cout <<
"Usage: doEvents.C(nevents,\"-\",\"some_directory/some_dst_file.xdf\")" << endl;
70 cout <<
" doEvents.C(nevents,\"-\",\"some_directory/some_dst_file.root\")" << endl;
71 cout <<
" doEvents.C(nevents,\"some_directory\",\"*.dst.root\")" << endl;
75 void doEvents(Int_t,
const Char_t **,
const Char_t *qaflag =
"");
77 void doEvents(Int_t nevents=5,
79 "links/P02gc.productionCentral.FullField.2001.313.dst/",
81 "st_physics_2313048_raw_0237.event.root",
82 const Char_t* outDir =
"./",
83 const Char_t *qaflag =
"off",
84 const Int_t wrStEOut = 0);
87 void doEvents(Int_t nevents,
const Char_t **fileList,
const Char_t* outDir,
88 const Char_t *qaflag,
const Int_t wrStEOut)
91 cout << endl << endl <<
" doEvents - input # events = " << nevents << endl;
93 while(fileList[ilist]){
94 cout <<
" doEvents - input fileList = " << fileList[ilist] << endl;
97 cout <<
" doEvents - input qaflag = " << qaflag << endl;
98 cout <<
" doEvents - input wrStEOut = " << wrStEOut << endl << endl << endl;
104 gSystem->Load(
"St_base");
105 gSystem->Load(
"StChain");
108 gSystem->Load(
"libgen_Tables");
109 gSystem->Load(
"libsim_Tables");
110 gSystem->Load(
"libglobal_Tables");
112 gSystem->Load(
"StUtilities");
113 gSystem->Load(
"StarClassLibrary");
115 gSystem->Load(
"StTpcDb");
116 gSystem->Load(
"StEvent");
117 gSystem->Load(
"StEventMaker");
119 gSystem->Load(
"StIOMaker");
120 gSystem->Load(
"StHiMicroEvent");
121 gSystem->Load(
"StHiMicroMaker");
124 chain =
new StChain(
"StChain");
130 if(fileList && fileList[0] && strstr(fileList[0],
".root")){
131 mainBranch = fileList[0];
132 mainBranch.ReplaceAll(
".root",
"");
133 int idot = strrchr((
char*)mainBranch,
'.') - mainBranch.Data();
134 mainBranch.Replace(0,idot+1,
"");
135 mainBranch+=
"Branch";
140 cout <<
"\t created" << endl;
143 ioMaker->SetBranch(
"*",0,
"0");
147 if(!mainBranch.IsNull()) ioMaker->SetBranch(mainBranch,0,
"r");
149 if(mainBranch==
"dstBranch"){
150 cout <<
"Creating event.root" << endl;
152 eventReader->doPrintEventInfo = 0;
157 hiPt->setOutDir(outDir);
158 hiPt->setDebug(debug);
159 hiPt->setHitLoop(doIt);
166 Int_t iInit = chain->Init();
167 if (iInit) chain->Fatal(iInit,
"on init");
175 EventLoop:
if (i <= nevents && istat!=2) {
177 cout << endl <<
"============================ Event " << i
178 <<
" start ============================" << endl;
181 istat = chain->
Make(i);
184 {cout <<
"Last event processed. Status = " << istat << endl;}
186 {cout <<
"Error event processed. Status = " << istat << endl;}
196 cout << endl <<
"============================ Event " << i
197 <<
" finish ============================" << endl;
203 void doEvents(
const Int_t nevents,
const Char_t *path,
const Char_t *file,
204 const Char_t *outDir,
205 const Char_t *qaflag,
const Int_t wrStEOut)
207 if (nevents==-1) { Help();
return;}
208 const char *fileListQQ[]={0,0};
209 if (strncmp(path,
"GC",2)==0) {
211 }
else if (path[0]==
'-') {
213 }
else if (!file[0]) {
216 fileListQQ[0] = gSystem->ConcatFileName(path,file);
218 doEvents(nevents,fileListQQ,outDir,qaflag,wrStEOut);
virtual void SetIOMode(Option_t *iomode="w")
number of transactions
virtual void Clear(Option_t *option="")
User defined functions.