]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Added proper way to delete tree in BranchList
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 26 Aug 2002 12:23:54 +0000 (12:23 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 26 Aug 2002 12:23:54 +0000 (12:23 +0000)
EMCAL/AliEMCALGetter.cxx
PHOS/AliPHOSGetter.cxx

index f4a65db0690619bfc4e1699e2921dea1f3798e9c..66c79f4c5021a67a3f8df1e89d43c1b8d2317a3e 100644 (file)
@@ -347,8 +347,18 @@ const Bool_t AliEMCALGetter::BranchExists(const TString recName) const
       return kTRUE ; 
     }
   }
-  tree->Delete();  
-  
+    //We can't delete three if gAlice points to it... To be redisigned somehow???!!!
+  if(!fToSplit){
+    if(name.Contains("TreeS"))
+      if(tree!=gAlice->TreeS())
+       tree->Delete();
+    if(name.Contains("TreeD"))
+      if(tree!=gAlice->TreeD())
+       tree->Delete();
+    if(name.Contains("TreeR"))
+      if(tree!=gAlice->TreeR())
+       tree->Delete();    
+  }
   return kFALSE ;
   
 }
index bb457101ec7eb3840789c97ff7508380fd7b39ad..7f33e4dbe46d52b400c7c79d5f94c92fc3193ab1 100644 (file)
@@ -345,8 +345,18 @@ const Bool_t AliPHOSGetter::BranchExists(const TString recName) const
       return kTRUE ; 
     }
   }
-  tree->Delete();
-  
+  //We can't delete three if gAlice points to it... To be redisigned somehow???!!!
+  if(!fToSplit){
+    if(name.Contains("TreeS"))
+      if(tree!=gAlice->TreeS())
+       tree->Delete();
+    if(name.Contains("TreeD"))
+      if(tree!=gAlice->TreeD())
+       tree->Delete();
+    if(name.Contains("TreeR"))
+      if(tree!=gAlice->TreeR())
+       tree->Delete();    
+  }
   return kFALSE ;
   
 }