00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 class StChain;
00034 StChain *chain;
00035
00036 class StIOMaker;
00037 StIOMaker *IOMk=0;
00038
00039 class StHistUtil;
00040
00041
00042
00043 void bfcread_hist_printinfo(
00044 const Char_t *MainFile=
00045 "/star/rcf/test/dev/tfs_redhat61/Tue/year_1h/hc_standard/hc_standard.40_evts.hist.root",
00046 const Char_t *fname="HistInfo.out",
00047 const Char_t *MakerHistDir="EventQA",
00048 const Char_t *TopDirTree="bfcTree")
00049 {
00050 cout << "bfcread_hist_printinfo.C, input hist file = "
00051 << MainFile << endl;
00052 cout << "bfcread_hist_printinfo.C, output hist info file = "
00053 << fname << endl;
00054 cout << "bfcread_hist_printinfo.C, directory name for hist = "
00055 << MakerHistDir << endl;
00056 cout << "bfcread_hist_printinfo.C, top level directory in hist file = "
00057 << TopDirTree << endl;
00058
00059
00060 gSystem->Load("St_base");
00061 gSystem->Load("StChain");
00062 gSystem->Load("StIOMaker");
00063 gSystem->Load("StarClassLibrary");
00064 gSystem->Load("StUtilities");
00065 gSystem->Load("StAnalysisUtilities");
00066 gSystem->Load("libglobal_Tables");
00067
00068
00069 StHistUtil *HU = new StHistUtil;
00070
00071
00072 StIOMaker *IOMk = new StIOMaker("IO","r",MainFile,TopDirTree);
00073 IOMk->SetIOMode("r");
00074 IOMk->SetBranch("*",0,"0");
00075 IOMk->SetBranch("histBranch",0,"r");
00076
00077
00078 IOMk->Init();
00079 IOMk->Clear();
00080 IOMk->Make();
00081
00082
00083 HU->SetPntrToMaker((StMaker *)IOMk);
00084
00085
00086 TList *dirList = 0;
00087 dirList = HU->FindHists(MakerHistDir);
00088
00089
00090 Int_t hCCount=0;
00091 hCCount = HU->PrintInfoHists(dirList,fname);
00092
00093 cout << "bfcread_hist_printinfo.C, # histograms found = " <<
00094 hCCount << endl;
00095
00096
00097 }
00098
00099
00100
00101
00102
00103
00104