ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/TAM/src/TAMTreeBranchLoader.cxx
(Generate patch)

Comparing UserCode/MitAna/TAM/src/TAMTreeBranchLoader.cxx (file contents):
Revision 1.1 by loizides, Tue May 27 19:13:21 2008 UTC vs.
Revision 1.2 by loizides, Mon Oct 6 16:42:50 2008 UTC

# Line 296 | Line 296 | Int_t TAMTreeBranchLoader::GetEntry(Long
296   {
297     // Get requested entry.
298  
299 <   Int_t ret = fBranch->GetEntry(entry);
299 >   Int_t ret = 0;
300 >
301 >   // do not reread branch
302 >   if (entry!=fBranch->GetReadEntry())
303 >     ret = fBranch->GetEntry(entry);
304 >
305     if(ret<0) {
306        Error("GetEntry",
307              "I/O error in file [%s] (at entry %lld) "
# Line 322 | Line 327 | Bool_t TAMTreeBranchLoader::Notify(TTree
327     // get branch with requested branch name
328     // first check if given name is alias
329     TString brname(tree->GetAlias(GetBInfo()->GetName()));
330 <   if(brname.IsNull())
330 >   if (brname.IsNull())
331        brname=GetBInfo()->GetName();
332     fBranch = tree->GetBranch(brname);
333  
# Line 331 | Line 336 | Bool_t TAMTreeBranchLoader::Notify(TTree
336        return kFALSE;
337     }
338    
339 <   // get branch information and check if types match
340 <   if (CheckBrTypeAllModules()==kFALSE) {
341 <      Error("Notify", "CheckBrTypeAllModules failed.");
342 <      return kFALSE;
339 >   if (GetBInfo()->fUsrAddresses.size()) {
340 >      // get branch information and check if types match
341 >     if (CheckBrTypeAllModules()==kFALSE) {
342 >        Error("Notify", "CheckBrTypeAllModules failed.");
343 >        return kFALSE;
344 >     }
345 >   } else {
346 >      // zero usr addresses (only possible for autoloading)
347 >      TClass* cls = gROOT->GetClass(fBranch->GetClassName());
348 >      if (cls!=0) { // known class
349 >         fIsClass = kTRUE;
350 >         fClass = cls;
351 >      }
352     }
353  
354     // allocate memory on heap at fBAddr

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines