64 void bfcread_hist_integrated_to_ps(
66 const Char_t *fileName=
"filelist",
67 const Char_t *MakerHistDir=
"EventQA",
68 const Char_t *TopDirTree=
"bfcTree",
69 const Char_t *psFile=
"QA_hist.ps",
70 const Char_t *PageTitle=
"",
71 const Char_t *PrintList=
"",
77 cout <<
"bfcread_hist_integrated_to_ps.C, input file list = "
79 cout <<
"bfcread_hist_integrated_to_ps.C, directory name for hist = "
80 << MakerHistDir << endl;
81 cout <<
"bfcread_hist_integrated_to_ps.C, top level directory in hist file = "
82 << TopDirTree << endl;
83 cout <<
"bfcread_hist_integrated_to_ps.C, output ps file = "
85 cout <<
"bfcread_hist_integrated_to_ps.C, page title for histograms = "
87 cout <<
"bfcread_hist_integrated_to_ps.C, subset list name of which histograms to draw,print = "
89 cout <<
"bfcread_hist_integrated_to_ps.C, # histograms on page horizontally = "
91 cout <<
"bfcread_hist_integrated_to_ps.C, # histograms on page vertically = "
95 gSystem->Load(
"St_base");
96 gSystem->Load(
"StChain");
97 gSystem->Load(
"StIOMaker");
98 gSystem->Load(
"StUtilities");
99 gSystem->Load(
"StAnalysisUtilities");
100 gSystem->Load(
"libglobal_Tables");
101 gSystem->Load(
"libtpc_Tables");
102 gSystem->Load(
"libStDb_Tables.so");
103 gSystem->Load(
"StDetectorDbMaker");
104 gSystem->Load(
"StBichsel");
105 gSystem->Load(
"StEvent");
106 gSystem->Load(
"StTpcDb");
107 gSystem->Load(
"StPmdUtil");
108 gSystem->Load(
"St_QA_Maker");
111 char **fList =
new char[8192][256];
112 ifstream fin(fileName);
115 cout <<
"Input file " << fileName <<
" found." << endl;
116 for (Int_t i=0;i<nfiles;i++){
117 char *line =
new char[256];
119 if (fin.eof())
break;
121 cout <<
" Added file : " << fList[j] << endl;
132 IOMk->SetBranch(
"*",0,
"0");
133 IOMk->SetBranch(
"histBranch",0,
"r");
136 TString HMname = MakerHistDir;
137 HMname.Prepend(
"Summed");
138 const char* MakerHistDirS = HMname.Data();
146 Int_t SHUidx, prefixNum, nPrefixes = SHU[0]->GetNumOfPosPrefixes();
150 for (SHUidx=0;SHUidx<2;SHUidx++) {
152 HU->SetPntrToMaker(IOMk);
153 HU->IgnorePrefixes();
154 HU->SetDefaultPrintList(MakerHistDir,PrintList);
155 firstSet[SHUidx] = kTRUE;
166 while (ifl<nfiles && istat==0) {
168 cout <<
"\nNow processing file : " << ifl+1 <<
"\n" << endl;
173 istat = IOMk->Open();
174 istat = IOMk->
Make();
177 if (!(IOMk->GetDataSet(
"hist"))) {
178 cout <<
" No histogram branch found in file!" << endl;
184 for (prefixNum=0; prefixNum < nPrefixes; prefixNum++) {
185 SHUidx = (prefixNum>0 ? 1 : 0);
188 TList* dirList = HU->FindHists(MakerHistDir,HU->GetPrefix(prefixNum));
189 if (dirList && (dirList->GetSize())) {
191 if (firstSet[SHUidx]) {
192 firstSet[SHUidx] = kFALSE;
195 hCCount = HU->CopyHists(dirList);
196 cout <<
"bfcread_hist_integrated_to_ps.C, # histograms copied with prefix " <<
197 HU->GetPrefix(prefixNum) <<
" = " << hCCount << endl;
199 HM->SetHArraySize(HU->getNewHistSize());
200 HM->SetHArray(HU->getNewHist());
203 hCCount = HU->AddHists(dirList);
204 cout <<
"bfcread_hist_integrated_to_ps.C, # histograms added with prefix " <<
205 HU->GetPrefix(prefixNum) <<
" = " << hCCount << endl;
215 istat = IOMk->Close();
224 NoHist = HU->ListHists(MakerHistDirS);
225 cout <<
" in bfcread_hist_list: Num of Hist = " << NoHist << endl;
228 gROOT->SetStyle(
"Plain");
231 HU->SetHistsNamesDraw(
"*",
"*");
232 HU->GetRunYear(fList[0]);
233 HU->SetOutFile(psFile);
234 HU->SetZones(ZoneH,ZoneV);
236 HU->SetDefaultLogXList(MakerHistDirS);
237 HU->SetDefaultLogYList(MakerHistDirS);
238 if (PageTitle==
"") PageTitle=fileName;
239 HU->SetGlobalTitle(PageTitle);
243 numLog = HU->ExamineLogYList();
244 cout <<
" bfcread_hist_integrated_to_ps.C, Number hist to plot with log scale = " << numLog << endl;
247 numPrint = HU->ExaminePrintList();
248 cout <<
" bfcread_hist_integrated_to_ps.C, Number hist to print = " << numPrint << endl;
251 HU->DrawHists(MakerHistDirS);
253 cout <<
" bfcread_hist_integrated_to_ps.C, end of macro" << endl;
virtual void Clear(Option_t *opt)
User defined functions.
virtual void SetIOMode(Option_t *iomode="w")
number of transactions