]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPC.cxx
Changes needed on Sun
[u/mrichter/AliRoot.git] / TPC / AliTPC.cxx
index f006ca43ecade53a0b7cea94787c831121e7f747..d8ec691232de8de3101ec1ac88a717f27c90ac62 100644 (file)
@@ -73,8 +73,6 @@
 #include "AliTPCTrackHits.h"
 #include "AliTPCTrackHitsV2.h"
 #include "AliTPCcluster.h"
-#include "AliTPCclusterer.h"
-#include "AliTPCtracker.h"
 #include "AliTrackReference.h"
 
 
@@ -316,8 +314,8 @@ void AliTPC::Clusters2Tracks()
   //-----------------------------------------------------------------
   // This is a track finder.
   //-----------------------------------------------------------------
-  AliTPCtracker tracker(fTPCParam,0,fLoader->GetEventFolder()->GetName());
-  tracker.Clusters2Tracks();
+  Error("Clusters2Tracks",
+  "Dummy function !  Call AliTPCtracker::Clusters2Tracks(...) instead !");
  }
 
 //_____________________________________________________________________________
@@ -432,7 +430,7 @@ void AliTPC::CreateMaterials()
   // gases - mixtures, ID >= 20 pure gases, <= 10 ID < 20 -compounds
   //----------------------------------------------------------------
 
-  char namate[21]; 
+  char namate[21]=""
   density = 0.;
   Float_t am=0;
   Int_t nc;
@@ -839,13 +837,14 @@ void AliTPC::Digits2Clusters(Int_t eventnumber)
   //-----------------------------------------------------------------
   // This is a simple cluster finder.
   //-----------------------------------------------------------------
-  AliTPCclusterer::Digits2Clusters(fTPCParam, fLoader,eventnumber);
+  Error("Digits2Clusters",
+  "Dummy function !  Call AliTPCclusterer::Digits2Clusters(...) instead !");
 }
 
 extern Double_t SigmaY2(Double_t, Double_t, Double_t);
 extern Double_t SigmaZ2(Double_t, Double_t);
 //_____________________________________________________________________________
-void AliTPC::Hits2Clusters(TFile *of, Int_t eventn)
+void AliTPC::Hits2Clusters(Int_t eventn)
 {
   //--------------------------------------------------------
   // TPC simple cluster generator from hits
@@ -917,7 +916,7 @@ void AliTPC::Hits2Clusters(TFile *of, Int_t eventn)
   
   AliRunLoader* rl = (AliRunLoader*)fLoader->GetEventFolder()->FindObject(AliRunLoader::fgkRunLoaderName);
   rl->CdGAFile();
-  fTPCParam->Write(fTPCParam->GetTitle());
+  //fTPCParam->Write(fTPCParam->GetTitle());
 
   AliTPCClustersArray carray;
   carray.Setup(fTPCParam);
@@ -1456,19 +1455,25 @@ void AliTPC::Hits2Digits(Int_t eventnumber)
  for(Int_t isec=0;isec<fTPCParam->GetNSector();isec++) 
   if (IsSectorActive(isec)) 
    {
-    cout<<"Sector "<<isec<<"is active\n";
+    if (fDebug) Info("Hits2Digits","Sector %d is active.",isec);
     Hits2DigitsSector(isec);
    }
   else
    {
-    cout<<"Sector "<<isec<<"is NOT active\n";
+    if (fDebug) Info("Hits2Digits","Sector %d is NOT active.",isec);
    }
 
   fLoader->WriteDigits("OVERWRITE"); 
+  
+//this line prevents the crash in the similar one
+//on the beginning of this method
+//destructor attempts to reset the tree, which is deleted by the loader
+//need to be redesign
+ if(GetDigitsArray()) delete GetDigitsArray();
+ SetDigitsArray(0x0);
+  
 }
 
-
-
 //__________________________________________________________________
 void AliTPC::Hits2SDigits2(Int_t eventnumber)  
 { 
@@ -2485,18 +2490,21 @@ void AliTPC::SetTreeAddress2()
     if (branch) 
      {
        branch->SetAddress(&fTrackHits);
-       cout<<"AliTPC::SetTreeAddress2 fHitType&4 Setting"<<endl;       
+       if (GetDebug()) Info("SetTreeAddress2","fHitType&4 Setting");
      }
-    else cout<<"AliTPC::SetTreeAddress2 fHitType&4  Failed"<<endl;
+    else 
+    if (GetDebug()) Info("SetTreeAddress2","fHitType&4 Failed (can not find branch)");
+    
   }
   if ((treeH)&&(fHitType&2)) {
     branch = treeH->GetBranch(branchname);
     if (branch) 
      {
        branch->SetAddress(&fTrackHitsOld);
-       cout<<"AliTPC::SetTreeAddress2 fHitType&2 Setting"<<endl;       
+       if (GetDebug()) Info("SetTreeAddress2","fHitType&2 Setting");
      }
-    else cout<<"AliTPC::SetTreeAddress2 fHitType&2  Failed"<<endl;
+    else if (GetDebug()) 
+      Info("SetTreeAddress2","fHitType&2 Failed (can not find branch)");
   }
   //set address to TREETR
 
@@ -3027,19 +3035,8 @@ void AliTPC::Digits2Reco(Int_t firstevent,Int_t lastevent)
 
 AliLoader* AliTPC::MakeLoader(const char* topfoldername)
 {
- cout<<"AliTPC::MakeLoader ";
+//Makes TPC loader
  fLoader = new AliTPCLoader(GetName(),topfoldername);
- if (fLoader)
-  {
-   cout<<"Success"<<endl;
-  }
- else
-  {
-   cout<<"Failure"<<endl;
-  }
-
  return fLoader;
 }