Changeset 894 for trunk/MagicSoft/Mars/mbase
- Timestamp:
- 07/23/01 14:37:44 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MReadTree.cc
r867 r894 48 48 #include <TArrayC.h> 49 49 #include <TObjArray.h> 50 #include <TChainElement.h> 50 51 51 52 #include "MLog.h" … … 87 88 MReadTree::~MReadTree() 88 89 { 90 // 91 // Delete all the pointers to pointers to the objects where the 92 // branche data gets stored. 93 // 94 TIter Next(fChain->GetStatus()); 95 96 TChainElement *element = NULL; 97 while ((element=(TChainElement*)Next())) 98 delete (MParContainer**)element->GetBaddress(); 99 100 // 101 // Delete the chain and the veto list 102 // 89 103 delete fChain; 90 104 delete fVetoList; … … 161 175 continue; 162 176 177 178 // 179 // Create a pointer to the pointer to the object in which the 180 // branch data is stored. The pointers are stored in the TChain 181 // object and we get the pointers from there to delete it. 182 // 183 MParContainer **pcont = new MParContainer*; 184 163 185 // 164 186 // check if object is existing in the list 165 187 // 166 MParContainer *pcont = pList->FindCreateObj(name); 167 168 169 if (!pcont) 188 *pcont=pList->FindCreateObj(name); 189 190 if (!*pcont) 170 191 { 171 192 // … … 182 203 // 183 204 // FIXME: is it correct, that the pointer is deleted immediatly afterwards? 184 branch->SetAddress(&pcont);205 fChain->SetBranchAddress(name, pcont); 185 206 } 186 207 … … 207 228 // 208 229 fChain->GetEntry(fNumEntry); 230 cout << " " << fChain->LoadTree(fNumEntry) << " "<<flush; 209 231 210 232 fNumEntry++;
Note:
See TracChangeset
for help on using the changeset viewer.