]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSclustererV2.cxx
Radiator to Pad goes static.
[u/mrichter/AliRoot.git] / ITS / AliITSclustererV2.cxx
index 5019fe1f44627a5e3eb650e7fd3e4edded771554..80df738bb3fd15bb7d51e412e7c8c3616f1dd6df 100644 (file)
@@ -36,8 +36,7 @@ AliITSclustererV2::AliITSclustererV2(const AliITSgeom *geom) {
 
   Int_t mmax=geom->GetIndexMax();
   if (mmax>2200) {
-     Error("AliITSclustererV2","Too many ITS subdetectors !"); 
-     exit(1);
+     Fatal("AliITSclustererV2","Too many ITS subdetectors !"); 
   }
   Int_t m;
   for (m=0; m<mmax; m++) {
@@ -170,6 +169,9 @@ void AliITSclustererV2::Digits2Clusters(AliRawReader* rawReader) {
   delete array;
 
   TClonesArray** clusters = new TClonesArray*[fNModules]; 
+  for (Int_t iModule = 0; iModule < fNModules; iModule++) {
+    clusters[iModule] = NULL;
+  }
   // one TClonesArray per module
 
   rawReader->Reset();
@@ -187,7 +189,7 @@ void AliITSclustererV2::Digits2Clusters(AliRawReader* rawReader) {
   // write all clusters to the tree
   Int_t nClusters = 0;
   for (Int_t iModule = 0; iModule < fNModules; iModule++) {
-    TClonesArray* array = clusters[iModule];
+    array = clusters[iModule];
     if (!array) {
       Error("Digits2Clusters", "data for module %d missing!", iModule);
       array = new TClonesArray("AliITSclusterV2");
@@ -199,6 +201,8 @@ void AliITSclustererV2::Digits2Clusters(AliRawReader* rawReader) {
   }
   itsLoader->WriteRecPoints("OVERWRITE");
 
+  delete[] clusters;
+
   Info("Digits2Clusters", "total number of found clusters in ITS: %d\n", 
        nClusters);
 }
@@ -415,7 +419,7 @@ FindClustersSPD(const TClonesArray *digits, TClonesArray *clusters) {
      new (cl[n]) AliITSclusterV2(lab,lp); n++; 
   }
 
-  delete bins;
+  delete [] bins;
 }
 
 void AliITSclustererV2::FindClustersSPD(AliITSRawStream* input,