48 void bfcread_hist_prefixes_add(
49 const Char_t *fileName=
"",
50 const Char_t *outHistFile=
"summed",
51 const Char_t *TopDirTree=
"bfcTree")
53 cout <<
"bfcread_hist_prefixes_add.C, input file = "
55 cout <<
"bfcread_hist_prefixes_add.C, output file = "
56 << outHistFile << endl;
57 cout <<
"bfcread_hist_prefixes_add.C, top level directory in hist file = "
58 << TopDirTree << endl;
60 gSystem->Load(
"St_base");
61 gSystem->Load(
"StChain");
62 gSystem->Load(
"StIOMaker");
63 gSystem->Load(
"StUtilities");
64 gSystem->Load(
"StAnalysisUtilities");
65 gSystem->Load(
"libglobal_Tables");
66 gSystem->Load(
"libtpc_Tables");
67 gSystem->Load(
"libStDb_Tables.so");
68 gSystem->Load(
"StDetectorDbMaker");
69 gSystem->Load(
"StBichsel");
70 gSystem->Load(
"StEvent");
71 gSystem->Load(
"StTpcDb");
72 gSystem->Load(
"StPmdUtil");
73 gSystem->Load(
"St_QA_Maker");
74 gSystem->Load(
"StTreeMaker");
78 char *MakerHistDir=
new char[256];
83 treeMk->SetBranch(
"histBranch");
92 IOMk->SetBranch(
"*",0,
"0");
93 IOMk->SetBranch(
"histBranch",0,
"r");
108 istat = IOMk->Open();
109 istat = IOMk->
Make();
111 Event = IOMk->GetDataSet(
"hist");
113 cout <<
" No histogram branch found in file!" << endl;
122 dirList = (TList *) histContainer->
GetObject();
123 strcpy(MakerHistDir,histContainer->GetName());
124 MakerHistDir[strlen(MakerHistDir)-4] = 0;
129 cout <<
"\n --- MakerHistDir : " << MakerHistDir << endl;
132 HU[nbranch]->SetPntrToMaker(IOMk);
133 HU[nbranch]->IgnorePrefixes();
137 int nPrefixes = HU[nbranch]->GetNumOfPosPrefixes();
138 Bool_t firstSet = kTRUE;
139 for (prefixNum=0; prefixNum < nPrefixes; prefixNum++) {
142 dirList = HU[nbranch]->FindHists(MakerHistDir,HU[nbranch]->GetPrefix(prefixNum));
143 if (dirList->GetSize()) {
149 hCCount = HU[nbranch]->CopyHists(dirList);
150 cout <<
"bfcread_hist_prefixes_add.C, # histograms copied with prefix " <<
151 HU[nbranch]->GetPrefix(prefixNum) <<
" = " << hCCount << endl;
153 if (HM[nbranch]==0) {
157 HM[nbranch]->SetHArraySize(HU[nbranch]->getNewHistSize());
158 HM[nbranch]->SetHArray(HU[nbranch]->getNewHist());
161 hCCount = HU[nbranch]->AddHists(dirList);
162 cout <<
"bfcread_hist_prefixes_add.C, # histograms added with prefix " <<
163 HU[nbranch]->GetPrefix(prefixNum) <<
" = " << hCCount << endl;
166 HU[nbranch]->Clear();
173 istat = IOMk->Close();
virtual void Clear(Option_t *opt)
User defined functions.
virtual void SetIOMode(Option_t *iomode="w")
number of transactions
virtual TDataSet * Next() const
virtual void Shunt(TDataSet *newParent=0)
virtual TObject * GetObject() const
The depricated method (left here for the sake of the backward compatibility)