54 class StEventDisplayMaker;
55 StEventDisplayMaker *dsMaker = 0;
58 const char *dstFile = 0;
59 const char *xdfFile = 0;
60 const char *mdcFile = 0;
61 const char *fileList[] = {dstFile,xdfFile,mdcFile,0};
65 cout <<
"Usage: doHists.C(nevents,\"-\",\"some_directory/some_dst_file.xdf\")" << endl;
66 cout <<
" doHists.C(nevents,\"-\",\"some_directory/some_dst_file.root\")" << endl;
67 cout <<
" doHists.C(nevents,\"some_directory\",\"*.dst.root\")" << endl;
71 void doHists(Int_t,
const Char_t **,
const Char_t *qaflag =
"");
73 void doHists(Int_t nevents=2,
74 const Char_t *path=
"/afs/rhic.bnl.gov/star/data/samples/gstar.hist.root",
75 const Char_t *file=
"",
76 const Char_t *qaflag =
"off",
77 const Int_t wrStEOut = 0);
80 void doHists(Int_t nevents,
const Char_t **fileList,
const Char_t *qaflag,
const Int_t wrStEOut)
83 cout << endl << endl <<
" doHists - input # events = " << nevents << endl;
85 while(fileList[ilist]){
86 cout <<
" doHists - input fileList = " << fileList[ilist] << endl;
89 cout <<
" doHists - input qaflag = " << qaflag << endl;
90 cout <<
" doHists - input wrStEOut = " << wrStEOut << endl << endl << endl;
96 gSystem->Load(
"St_base");
97 gSystem->Load(
"StChain");
99 gSystem->Load(
"libgen_Tables");
100 gSystem->Load(
"libsim_Tables");
101 gSystem->Load(
"libglobal_Tables");
103 gSystem->Load(
"StUtilities");
104 gSystem->Load(
"StIOMaker");
105 gSystem->Load(
"StTreeMaker");
106 gSystem->Load(
"StAnalysisUtilities");
111 chain =
new StChain(
"StChain");
114 setFiles=
new StFile(fileList);
116 gSystem->Load(
"StChallenger");
117 setFiles = StChallenger::Challenge();
118 setFiles->SetDebug();
119 const char *Argv[]= {
121 "-q",
"numberOfPrimaryTracks>1500",
122 "-c",
"/afs/rhic.bnl.gov/star/incoming/GCA/daq/stacs.rc"
124 Int_t Argc=
sizeof(Argv)/4;
125 setFiles->Init(Argc,Argv);
129 IOMk->SetBranch(
"*",0,
"0");
130 IOMk->SetBranch(
"histBranch",0,
"r");
131 IOMk->SetMaxEvent(1);
148 cout <<
"!!!! doHists: will write out .event.root file !!" << endl << endl;
151 outMk->SetBranch (
"mergeBranch",
"test.merge.root",
"w",
"const");
152 outMk->IntoBranch(
"mergeBranch",
"Merged");
157 Int_t iInit = chain->Init();
158 if (iInit) chain->Fatal(iInit,
"on init");
166 EventLoop:
if (i <= nevents && istat!=2) {
168 cout << endl <<
"============================ Event " << i
169 <<
" start ============================" << endl;
172 istat = chain->
Make(i);
175 {cout <<
"Last event processed. Status = " << istat << endl;}
177 {cout <<
"Error event processed. Status = " << istat << endl;}
183 cout << endl <<
"============================ Event " << i
184 <<
" finish ============================" << endl;
185 new TBrowser(
"AccumulatedHistograms",histsMaker->
FindByName(
".const"));
191 void doHists(
const Int_t nevents,
const Char_t *path,
const Char_t *file,
192 const Char_t *qaflag,
const Int_t wrStEOut)
194 if (nevents==-1) { Help();
return;}
195 const char *fileListQQ[]={0,0};
196 if (strncmp(path,
"GC",2)==0) {
198 }
else if (path[0]==
'-') {
200 }
else if (!file[0]) {
203 fileListQQ[0] = gSystem->ConcatFileName(path,file);
205 doHists(nevents,fileListQQ,qaflag,wrStEOut);
virtual void SetIOMode(Option_t *iomode="w")
number of transactions
virtual void Clear(Option_t *option="")
User defined functions.
virtual TDataSet * FindByName(const char *name, const char *path="", Option_t *opt="") const