]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - VZERO/AliVZEROSDigit.cxx
Complete reshuffling of the digitization code. Now VZERO has operational direct Hits...
[u/mrichter/AliRoot.git] / VZERO / AliVZEROSDigit.cxx
index 95acb65707bb2c25bea49cbfa61f82f38aefe7a8..1161f654b7935003b65dbcc9ecc0d57c1f30360d 100644 (file)
@@ -40,6 +40,7 @@ fCharges(NULL)
 {  
   // Constructor
   // Used in the digitizer
+  fCharges = new Float_t[fNBins];
   if (charges) {
     for(Int_t i = 0; i < fNBins; ++i)
       fCharges[i] = charges[i];
@@ -53,6 +54,17 @@ fCharges(NULL)
     for(Int_t iTrack = 0; iTrack < 3; ++iTrack) fTracks[iTrack] = labels[iTrack];
 }
 
+//__________________________________________________________________________
+AliVZEROSDigit::~AliVZEROSDigit()
+{
+  // Destructor
+  // Delete the charges array if it was allocated
+  if (fCharges) {
+    delete [] fCharges;
+    fCharges = NULL;
+  }
+}
+
 //__________________________________________________________________________
 void AliVZEROSDigit::Print(const Option_t*) const
 {