]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCclustererMI.cxx
- Replace the TClonesArray of AliMUONTrackParam by a TObjArray in
[u/mrichter/AliRoot.git] / TPC / AliTPCclustererMI.cxx
index cf06db9d07f739b9fa8aa427676b97e2b13db9cc..769730b547da36f6877c8625d4765d6c61d5f1d3 100644 (file)
@@ -132,9 +132,7 @@ AliTPCclustererMI::AliTPCclustererMI(const AliTPCParam* par, const AliTPCRecoPar
   }
 
   //  Int_t nPoints = fRecoParam->GetLastBin()-fRecoParam->GetFirstBin();
-  fRowCl= new AliTPCClustersRow();
-  fRowCl->SetClass("AliTPCclusterMI");
-  fRowCl->SetArray(1);
+  fRowCl= new AliTPCClustersRow("AliTPCclusterMI");
 
   // Non-persistent arrays
   //
@@ -223,6 +221,11 @@ AliTPCclustererMI::~AliTPCclustererMI(){
     delete fOutputClonesArray;
   }
 
+  if (fRowCl) {
+    fRowCl->GetArray()->Delete();
+    delete fRowCl;
+  }
+
   AliTPCROC * roc = AliTPCROC::Instance();
   Int_t nRowsMax = roc->GetNRows(roc->GetNSector()-1);
   for (Int_t iRow = 0; iRow < nRowsMax; iRow++) {
@@ -255,10 +258,8 @@ void AliTPCclustererMI::SetOutput(TTree * tree)
   //
   if (!tree) return;
   fOutput= tree;
-  AliTPCClustersRow clrow;
-  AliTPCClustersRow *pclrow=&clrow;  
-  clrow.SetClass("AliTPCclusterMI");
-  clrow.SetArray(1); // to make Clones array
+  AliTPCClustersRow clrow, *pclrow=&clrow;  
+  pclrow = new AliTPCClustersRow("AliTPCclusterMI");
   fOutput->Branch("Segment","AliTPCClustersRow",&pclrow,32000,200);    
 }
 
@@ -774,7 +775,7 @@ void AliTPCclustererMI::Digits2Clusters()
 
     FindClusters(noiseROC);
     FillRow();
-    fRowCl->GetArray()->Clear();    
+    fRowCl->GetArray()->Clear("C");    
     nclusters+=fNcluster;    
 
     delete[] fBins;
@@ -911,7 +912,7 @@ void AliTPCclustererMI::ProcessSectorData(){
     FindClusters(noiseROC);
     
     FillRow();
-    if(fBClonesArray == kFALSE) fRowCl->GetArray()->Clear();
+    if(fBClonesArray == kFALSE) fRowCl->GetArray()->Clear("C");
     fNclusters += fNcluster;
     
   } // End of loop to find clusters
@@ -1094,11 +1095,11 @@ void AliTPCclustererMI::Digits2Clusters(AliRawReader* rawReader)
   }
   
   if (rawReader->GetEventId() && fOutput ){
-    Info("Digits2Clusters", "File  %s Event\t%d\tNumber of found clusters : %d\n", fOutput->GetName(),*(rawReader->GetEventId()), fNclusters);
+    Info("Digits2Clusters", "File  %s Event\t%u\tNumber of found clusters : %d\n", fOutput->GetName(),*(rawReader->GetEventId()), fNclusters);
   }
   
   if(rawReader->GetEventId()) {
-    Info("Digits2Clusters", "Event\t%d\tNumber of found clusters : %d\n",*(rawReader->GetEventId()), fNclusters);
+    Info("Digits2Clusters", "Event\t%u\tNumber of found clusters : %d\n",*(rawReader->GetEventId()), fNclusters);
   }
   
   if(fBClonesArray) {