]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Fixed creation of arrays in the copy constructors
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 20 Dec 2007 13:28:48 +0000 (13:28 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 20 Dec 2007 13:28:48 +0000 (13:28 +0000)
PHOS/AliPHOSEmcRecPoint.cxx
PHOS/AliPHOSRecPoint.cxx

index b9249fa04dd1825e76fc9c9d17dae4cdbb9e529e..9fd7a8e5292d2f64c042a438b7e994c7787721c6 100644 (file)
@@ -18,6 +18,9 @@
 /* History of cvs commits:
  *
  * $Log$
+ * Revision 1.59  2007/10/18 15:12:22  kharlov
+ * Moved MakePrimary to EMCRecPoint to rpduce correct order of primaries
+ *
  * Revision 1.58  2007/04/16 09:03:37  kharlov
  * Incedent angle correction fixed
  *
@@ -105,9 +108,8 @@ AliPHOSEmcRecPoint::AliPHOSEmcRecPoint(const AliPHOSEmcRecPoint & rp) :
   // cpy ctor
   fMulDigit   = rp.fMulDigit ;  
   fAmp        = rp.fAmp ;   
-  fEnergyList = new Float_t[rp.fMulDigit] ;
-  Int_t index ; 
-  for(index = 0 ; index < fMulDigit ; index++) 
+  if (rp.fMulDigit>0) fEnergyList = new Float_t[rp.fMulDigit] ;
+  for(Int_t index = 0 ; index < fMulDigit ; index++) 
     fEnergyList[index] = rp.fEnergyList[index] ; 
 }
 
index 9e9163ffc48c8ded140c711c43e9f56d8f4b2bd4..a6010a34c6789842eccc1d9a9ff8f7c058a88c29 100644 (file)
@@ -78,15 +78,17 @@ AliPHOSRecPoint::~AliPHOSRecPoint()
 AliPHOSRecPoint::AliPHOSRecPoint(const AliPHOSRecPoint &rp) : 
   AliCluster(rp),
   fPHOSMod(rp.fPHOSMod),fMulTrack(rp.fMulTrack),fMaxDigit(rp.fMaxDigit),
-  fMulDigit(rp.fMulDigit),fMaxTrack(rp.fMaxTrack),fDigitsList(new Int_t[rp.fMaxDigit]),
-  fTracksList(new Int_t[rp.fMaxTrack]),fAmp(rp.fAmp),fIndexInList(rp.fIndexInList), 
+  fMulDigit(rp.fMulDigit),fMaxTrack(rp.fMaxTrack),fDigitsList(0x0),
+  fTracksList(0x0),fAmp(rp.fAmp),fIndexInList(rp.fIndexInList), 
   fLocPos(rp.fLocPos),fLocPosM(rp.fLocPosM)
 {
   //copy ctor
 
+  if (rp.fMulDigit>0) fDigitsList = new Int_t[rp.fMulDigit];
   for(Int_t i=0; i<fMulDigit; i++)
     fDigitsList[i] = rp.fDigitsList[i];
 
+  if (rp.fMulTrack>0) fTracksList = new Int_t[rp.fMulTrack];
   for(Int_t i=0; i<fMulTrack; i++)
     fTracksList[i] = rp.fTracksList[i];