Double_t arrays replaced by TArrayD ones to avoid overwriting of memory (T.Kuhr)
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 22 Mar 2004 07:29:12 +0000 (07:29 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 22 Mar 2004 07:29:12 +0000 (07:29 +0000)
RICH/AliRICHClusterFinder.cxx
RICH/AliRICHClusterFinder.h

index 08833d2ece7afbbd19bf4679c7fdc43f606ed2b7..5b4031576cd012704d0d29e06eeeb69a988a74a9 100644 (file)
@@ -65,6 +65,12 @@ void AliRICHClusterFinder::FindLocalMaxima()
       }
     }
     if(iNotMax==0) {
+      if (fNlocals >= fLocalX.GetSize()) {
+       fLocalX.Set(fNlocals+100);
+       fLocalY.Set(fNlocals+100);
+       fLocalQ.Set(fNlocals+100);
+       fLocalC.Set(fNlocals+100);
+      }
       TVector2 x2=AliRICHParam::Pad2Loc(padX1,padY1);
       fLocalX[fNlocals]=x2.X();fLocalY[fNlocals]=x2.Y();
       fLocalQ[fNlocals] = (Double_t)padQ1;
index 9c2b8bcf365d9ee10cf7db4efd794cbbc724d605..615e39f010f22f120001229ad39736e25d18c56e 100644 (file)
@@ -5,6 +5,8 @@
  * See cxx source for full Copyright notice                               */
 
 #include "TTask.h"
+#include "TArrayD.h"
+#include "TArrayI.h"
 
 #include "AliRICH.h"
 class AliHitMap;
@@ -33,9 +35,9 @@ protected:
   AliRICHcluster         fRawCluster;                    //Current raw cluster before deconvolution
   AliRICHcluster         fResolvedCluster;               //Current cluster after deconvolution
   Int_t                  fNlocals;                       // number of local maxima
-  Double_t               fLocalX[100],fLocalY[100];      // list of locals X,Y
-  Double_t               fLocalQ[100];                   // list of locals charge Q
-  Int_t                  fLocalC[100];                   // list of locals CombiPid
+  TArrayD                fLocalX,fLocalY;                // list of locals X,Y
+  TArrayD                fLocalQ;                        // list of locals charge Q
+  TArrayI                fLocalC;                        // list of locals CombiPid
   ClassDef(AliRICHClusterFinder,0) //Finds raw clusters, trasfers them to resolved clusters through declustering.
 };
 #endif