]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliDetector.cxx
ITS tasks from the pilot train added.
[u/mrichter/AliRoot.git] / STEER / AliDetector.cxx
index 573df6c40285fd0b78959d78aab1e25f90529926..9fd0964e5c37ef1bd95e59f9ec50c1ec2174eef2 100644 (file)
@@ -212,8 +212,8 @@ AliHit* AliDetector::FirstHit(Int_t track)
   // track is returned
   // 
   if(track>=0) {
-    gAlice->ResetHits(); //stupid = if N detector this method is called N times
-    TreeH()->GetEvent(track); //skowron
+    gAlice->GetMCApp()->ResetHits(); //stupid = if N detector this method is called N times
+    fLoader->TreeH()->GetEvent(track); //skowron
   }
   //
   fMaxIterHit=fHits->GetEntriesFast();
@@ -249,9 +249,9 @@ void AliDetector::MakeBranch(Option_t *option)
   AliDebug(2,Form(" for %s",GetName()));
   const char *cH = strstr(option,"H");
 
-  if (fHits && TreeH() && cH) 
+  if (fHits && fLoader->TreeH() && cH) 
    {
-     MakeBranchInTree(TreeH(), GetName(), &fHits, fBufferSize, 0);
+     MakeBranchInTree(fLoader->TreeH(), GetName(), &fHits, fBufferSize, 0);
    }   
 }
 
@@ -285,7 +285,7 @@ void AliDetector::SetTreeAddress()
   //
   // Branch address for hit tree
   
-  TTree *tree = TreeH();
+  TTree* tree = fLoader->TreeH();
   if (tree && fHits) {
     branch = tree->GetBranch(GetName());
     if (branch) 
@@ -339,18 +339,4 @@ AliLoader* AliDetector::MakeLoader(const char* topfoldername)
  return fLoader;
 }
 
-//_______________________________________________________________________
-TTree* AliDetector::TreeH() const
-{
-//Get the hits container from the folder
-  if (GetLoader() == 0x0) 
-    {
-    //sunstitude this with make getter when we can obtain the event folder name 
-     AliError("Can not get the getter");
-     return 0x0;
-    }
-  TTree* tree = (TTree*)GetLoader()->TreeH();
-  return tree;
-}