13 cout <<
"Usage: trigCtb.C(startEvent,nEvents,\"path/some_dst_file.xdf\")" << endl;
14 cout <<
" trigCtb.C(nEvents,\"path/*.event.root\")" << endl;
15 cout <<
" trigCtb.C(nEvents,\"path/file.dst.root\",\"evout\")" << endl;
19 void trigCtb(Int_t nEvents,
const Char_t ** fileList,
const Char_t *qaflag =0);
20 void trigCtb(Int_t startEvent, Int_t nEvents,
const Char_t ** fileList,
const Char_t *qaflag =0);
22 void trigCtb(Int_t nEvents=2,
23 const Char_t *file=
"/afs/rhic.bnl.gov/star/data/samples/gstar.dst.root",
24 const Char_t *qaflag = 0);
26 void trigCtb(Int_t startEvent=1,Int_t nEvents=2,
27 const Char_t *file=
"/afs/rhic.bnl.gov/star/data/samples/gstar.dst.root",
28 const Char_t *qaflag = 0);
30 void trigCtb(
const Int_t nEvents=2,
33 const Char_t *qaflag,
int flag);
39 void trigCtb(Int_t startEvent, Int_t nEvents,
const Char_t **fileList,
const Char_t *qaflag)
42 TString tflag = qaflag;
43 cout << endl << endl <<
" trigCtb - input # events = " << nEvents << endl;
45 while(fileList[ilist]){
46 cout <<
" trigCtb - input fileList = " << fileList[ilist] << endl;
49 cout <<
" trigCtb - input qaflag = " << qaflag << endl;
55 gSystem->Load(
"St_base");
56 gSystem->Load(
"StChain");
58 gSystem->Load(
"libgen_Tables");
59 gSystem->Load(
"libsim_Tables");
60 gSystem->Load(
"libglobal_Tables");
62 gSystem->Load(
"StUtilities");
63 gSystem->Load(
"StIOMaker");
64 gSystem->Load(
"StTreeMaker");
65 gSystem->Load(
"StarClassLibrary");
66 gSystem->Load(
"StEvent");
67 gSystem->Load(
"StMagF");
69 gSystem->Load(
"StTrgMaker");
77 setFiles=
new StFile(fileList);
79 gSystem->Load(
"StChallenger");
80 setFiles = StChallenger::Challenge();
84 "-q",
"numberOfPrimaryTracks>1500",
85 "-c",
"/afs/rhic.bnl.gov/star/incoming/GCA/daq/stacs.rc"
87 Int_t Argc=
sizeof(Argv)/4;
88 setFiles->Init(Argc,Argv);
92 if (fileList && fileList[0] && strstr(fileList[0],
".root")) {
93 mainBranch = fileList[0];
94 mainBranch.ReplaceAll(
".root",
"");
95 int idot = strrchr((
char*)mainBranch,
'.') - mainBranch.Data();
96 mainBranch.Replace(0,idot+1,
"");
102 IOMk->SetBranch(
"*",0,
"0");
103 if(!mainBranch.IsNull()) IOMk->SetBranch(mainBranch,0,
"r");
119 Int_t wrStEOut = tflag.Contains(
"evout",TString::kIgnoreCase);
121 cout <<
"!!!! trigCtb: will write out .event.root file !!" << endl << endl;
124 outMk->SetBranch(
"eventBranch",
"test.event.root",
"w");
125 outMk->IntoBranch(
"eventBranch",
"StEvent");
131 Int_t iInit = chain->Init();
132 if (iInit) chain->Fatal(iInit,
"on init");
147 EventLoop:
if (i <= nEvents && istat!=2) {
149 cout << endl <<
"============================ Event " << i
150 <<
" start ============================" << endl;
153 istat = chain->
Make(i);
156 {cout <<
"Last event processed. Status = " << istat << endl;}
158 {cout <<
"Error event processed. Status = " << istat << endl;}
163 ddstBranch=chain->GetDataSet(
"dstBranch");
169 cout << endl <<
" QAInfo: in dstBranch " << endl;
171 while (ddb=dstbranchIter.
Next()) {
174 " QAInfo: found object: " << ddb->GetName() << endl;
176 TString dsName = ddb->GetName();
178 if (ddb->InheritsFrom(
"TTable")) {
181 cout <<
" QAInfo: it is a table with #rows = "
184 if (dsName ==
"BfcStatus") {
192 for (; bth != bthEnd; bth++)
194 cout <<
" QAInfo: BfcStatus table -- row " << ij <<
195 ", Maker: " << (*bth).maker_name <<
196 " has istat = " << (*bth).status << endl;
211 cout << endl <<
"============================ Event " << i
212 <<
" finish ============================" << endl;
218 void trigCtb(
const Int_t startEvent,
const Int_t nEvents,
const Char_t *file,
const Char_t *qaflag)
220 printf(
"*file = %s\n",file);
221 if (nEvents==-1) { Help();
return;}
222 const char *fileListQQ[]={0,0};
223 if (strncmp(file,
"GC",2)==0) {
228 trigCtb(startEvent,nEvents,fileListQQ,qaflag);
231 void trigCtb(
const Int_t nEvents,
const Char_t *file,
const Char_t *qaflag)
233 trigCtb(1,nEvents,file,qaflag);
237 void trigCtb(
const Int_t nEvents,
const Char_t *path,
const Char_t *file,
const Char_t *qaflag,
int flag)
240 if (path && path[0] && path[0]!=
'-') F = path;
241 if (file && file[0] && file[0]!=
'-')
243 if (!F.IsNull()) F +=
"/";
246 TString opt = qaflag;
247 if (flag) opt +=
" evout";
250 trigCtb(1,nEvents,F.Data(),opt.Data());
254 void trigCtb(Int_t nEvents,
const Char_t **fileList,
const Char_t *qaflag)
255 { trigCtb(1,nEvents,fileList,qaflag); }
virtual void SetIOMode(Option_t *iomode="w")
number of transactions
virtual void Clear(Option_t *option="")
User defined functions.
virtual Long_t GetNRows() const
Returns the number of the used rows for the wrapped table.
virtual TDataSet * Next() const
virtual TDataSet * Find(const char *path) const