64 void bfcread_hist_prefixes_add_to_ps(
65 const Char_t *MainFile=
66 "/afs/rhic.bnl.gov/star/data/samples/gstar.hist.root",
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_prefixes_add_to_ps.C, input hist file = "
79 cout <<
"bfcread_hist_prefixes_add_to_ps.C, directory name for hist = "
80 << MakerHistDir << endl;
81 cout <<
"bfcread_hist_prefixes_add_to_ps.C, top level directory in hist file = "
82 << TopDirTree << endl;
83 cout <<
"bfcread_hist_prefixes_add_to_ps.C, output ps file = "
85 cout <<
"bfcread_hist_prefixes_add_to_ps.C, page title for histograms = "
87 cout <<
"bfcread_hist_prefixes_add_to_ps.C, subset list name of which histograms to draw,print = "
89 cout <<
"bfcread_hist_prefixes_add_to_ps.C, # histograms on page horizontally = "
91 cout <<
"bfcread_hist_prefixes_add_to_ps.C, # histograms on page vertically = "
95 gSystem->Load(
"St_base");
96 gSystem->Load(
"StChain");
97 gSystem->Load(
"StIOMaker");
98 gSystem->Load(
"libglobal_Tables");
99 gSystem->Load(
"StUtilities");
100 gSystem->Load(
"StAnalysisUtilities");
101 gSystem->Load(
"StBichsel");
102 gSystem->Load(
"StEvent");
103 gSystem->Load(
"StTpcDb");
104 gSystem->Load(
"StPmdUtil");
105 gSystem->Load(
"St_QA_Maker");
111 IOMk->SetBranch(
"*",0,
"0");
112 IOMk->SetBranch(
"histBranch",0,
"r");
114 TString HMname = MakerHistDir;
115 HMname.Prepend(
"Summed");
116 const char* MakerHistDirS = HMname.Data();
128 HO->SetPntrToMaker(IOMk);
129 HU->SetPntrToMaker(IOMk);
130 HO->IgnorePrefixes();
131 HU->IgnorePrefixes();
141 HO->SetDefaultPrintList(MakerHistDir,PrintList);
142 TList* dirList = HO->FindHists(MakerHistDir,HO->GetPrefix(0));
146 int nPrefixes = HO->GetNumOfPosPrefixes();
147 Bool_t firstSet = kTRUE;
148 for (prefixNum=0; prefixNum < nPrefixes; prefixNum++) {
151 dirList = HO->FindHists(MakerHistDir,HO->GetPrefix(prefixNum));
152 if (dirList->GetSize()) {
158 hCCount = HO->CopyHists(dirList);
159 cout <<
"bfcread_hist_prefixes_add_to_ps.C, # histograms copied with prefix " <<
160 HO->GetPrefix(prefixNum) <<
" = " << hCCount << endl;
162 HM->SetHArraySize(HO->getNewHistSize());
163 HM->SetHArray(HO->getNewHist());
166 hCCount = HO->AddHists(dirList);
167 cout <<
"bfcread_hist_prefixes_add_to_ps.C, # histograms added with prefix " <<
168 HO->GetPrefix(prefixNum) <<
" = " << hCCount << endl;
181 NoHist = HU->ListHists(MakerHistDirS);
182 cout <<
" in bfcread_hist_list: Num of Hist = " << NoHist << endl;
185 gROOT->SetStyle(
"Plain");
188 HU->SetHistsNamesDraw(
"*",
"*");
189 HU->GetRunYear(MainFile);
190 HU->SetOutFile(psFile);
191 HU->SetZones(ZoneH,ZoneV);
193 HU->SetDefaultLogXList(MakerHistDirS);
194 HU->SetDefaultLogYList(MakerHistDirS);
195 if (PageTitle==
"") PageTitle=MainFile;
196 HU->SetGlobalTitle(PageTitle);
198 HU->SetDefaultPrintList(MakerHistDirS,PrintList);
201 numLog = HU->ExamineLogYList();
202 cout <<
" bfcread_hist_prefixes_add_to_ps.C, Number hist to plot with log scale = " << numLog << endl;
205 numPrint = HU->ExaminePrintList();
206 cout <<
" bfcread_hist_prefixes_add_to_ps.C, Number hist to print = " << numPrint << endl;
209 HU->DrawHists(MakerHistDirS);
211 cout <<
" bfcread_hist_prefixes_add_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