106 void bfcread_event_QAhist(
108 const Char_t *MainFile=
110 "/star/rcf/test/dev/trs_redhat61/Tue/year_2001/hc_standard/hc_standard.40_evts.event.root",
111 const Char_t *psFile=
"EventQAhist.ps",
112 const Char_t *PageTitle=
"",
113 const Char_t *PrintList=
"",
114 const Char_t *MakerHistDir=
"EventQA",
120 cout <<
"bfcread_event_QAhist.C, num events to process " <<
122 cout <<
"bfcread_event_QAhist.C, input file name " <<
124 cout <<
"bfcread_event_QAhist.C, output psfile name " <<
126 cout <<
"bfcread_event_QAhist.C, hist page title " <<
128 cout <<
"bfcread_event_QAhist.C, Maker directory containing histograms = "
129 << MakerHistDir << endl;
130 cout <<
"bfcread_event_QAhist.C, subset list name of which histograms to draw,print = "
131 << PrintList << endl;
133 gSystem->Load(
"St_base");
134 gSystem->Load(
"StChain");
135 gSystem->Load(
"St_Tables");
136 gSystem->Load(
"libglobal_Tables");
137 gSystem->Load(
"libsim_Tables");
138 gSystem->Load(
"libgen_Tables");
139 gSystem->Load(
"libgeometry_Tables");
141 gSystem->Load(
"StUtilities");
142 gSystem->Load(
"StAnalysisUtilities");
143 gSystem->Load(
"StIOMaker");
144 gSystem->Load(
"StarClassLibrary");
145 gSystem->Load(
"StBichsel");
146 gSystem->Load(
"StDetectorDbMaker");
147 gSystem->Load(
"StEvent");
148 gSystem->Load(
"StTpcDb");
149 gSystem->Load(
"StDbUtilities");
150 gSystem->Load(
"StDbLib");
151 gSystem->Load(
"StDbBroker");
152 gSystem->Load(
"St_db_Maker");
153 gSystem->Load(
"StEmcUtil");
154 gSystem->Load(
"StEEmcUtil");
155 gSystem->Load(
"StMcEvent");
156 gSystem->Load(
"StMcEventMaker");
157 gSystem->Load(
"StarMagField");
158 gSystem->Load(
"StMagF");
159 gSystem->Load(
"StPmdUtil");
160 gSystem->Load(
"St_QA_Maker");
163 chain =
new StChain(
"MyChain");
168 IOMk->SetBranch(
"evtselBranch",0,
"r");
169 IOMk->SetBranch(
"event",0,
"r");
170 IOMk->SetBranch(
"geantBranch",0,
"r");
171 IOMk->SetBranch(
"runcoBranch",0,
"r");
175 const char* calibDB =
"MySQL:StarDb";
176 const char* calibDB2 =
"$STAR/StarDb";
189 HU->SetPntrToMaker((
StMaker *)IOMk);
196 Int_t iInit = chain->Init();
197 if (iInit) chain->Fatal(iInit,
"on init");
203 NoHist = HU->ListHists(MakerHistDir);
204 cout <<
" !!! bfcread_event_QAhist.C, No. of Hist we have == " << NoHist << endl;
207 int iev=0,iret=0, evnum=0;
208 EventLoop:
if (iev<nevents && iret!=2) {
210 cout <<
" !!! bfcread_event_QAhist.C, processing event !!! " << evnum << endl ;
212 switch (iret = chain->
Make()) {
214 case 2: { gMessMgr->Info(
"Last event from input.");
break; }
215 case 3: { gMessMgr->Error() <<
"Event " << evnum <<
" had error " <<
216 iret <<
". Now skipping event."; gMessMgr->Print();
break; }
217 default: { gMessMgr->Warning() <<
"Event " << evnum <<
" returned status "
218 << iret <<
". Continuing."; gMessMgr->Print(); }
224 cout <<
" !!! bfcread_event_QAhist.C, passed chain->Make !!!" << endl ;
231 gROOT->SetStyle(
"Plain");
234 HU->SetHistsNamesDraw(
"*",
"*");
235 HU->GetRunYear(MainFile);
236 HU->SetPostScriptFile(psFile);
237 HU->SetZones(ZoneH,ZoneV);
239 HU->SetDefaultLogXList(MakerHistDir);
240 HU->SetDefaultLogYList(MakerHistDir);
241 if (PageTitle==
"") PageTitle=MainFile;
242 HU->SetGlobalTitle(PageTitle);
244 HU->SetDefaultPrintList(MakerHistDir,PrintList);
247 numLog = HU->ExamineLogYList();
248 cout <<
" bfcread_event_QAhist.C, Number hist to plot with log scale = " << numLog << endl;
251 numPrint = HU->ExaminePrintList();
252 cout <<
" bfcread_event_QAhist.C, Number hist to print = " << numPrint << endl;
256 HU->DrawHists(MakerHistDir);
259 Int_t result = HU->Overlay1D(MakerHistDir,
"StEQaGtrkRT",
"StEQaPtrkRT");
261 cout <<
" !!! There was an error in Overlay1D !!!" << endl;
263 result = HU->Overlay2D(MakerHistDir,
"StEQaGtrkLengthVEtaT",
"StEQaPtrkLengthVEtaT");
265 cout <<
" !!! There was an error in Overlay2D !!!" << endl;
virtual void Clear(Option_t *option="")
User defined functions.
Filling of all StMcEvent classes from g2t tables Transform all the data in the g2t tables into the co...