]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDarrayADC.cxx
rulechecker
[u/mrichter/AliRoot.git] / TRD / AliTRDarrayADC.cxx
index 4116907d3bd6aaf578c94342f3e68b2147ea7801..1730e7d82da9c74b8ce9af49d300f8ec8054be32 100644 (file)
@@ -28,6 +28,8 @@
 #include "Cal/AliTRDCalPadStatus.h"
 #include "AliTRDfeeParam.h"
 #include "AliTRDSignalIndex.h"
+#include "AliLog.h"
+
 ClassImp(AliTRDarrayADC)
 
 Short_t *AliTRDarrayADC::fgLutPadNumbering = 0x0;
@@ -296,6 +298,12 @@ void AliTRDarrayADC::Compress()
   // Compress the array
   //
 
+  if(fNAdim!=fNrow*fNumberOfChannels*fNtime)
+    {
+      AliDebug(1,"The ADC array is already compressed");
+      return;
+    }
+
   Int_t counter=0;
   Int_t newDim=0;
   Int_t j;                  
@@ -418,8 +426,15 @@ void AliTRDarrayADC::Compress()
           buffer=0;
         } 
 
+    }
+
+  if (longz)
+    {
       delete [] longz;
       longz=0;
+    }
+  if (longm)
+    {
       delete [] longm;
       longm=0;
 
@@ -449,7 +464,7 @@ void AliTRDarrayADC::Expand()
   
       if(verif==0)
         {
-          //AliDebug(1,"Nothing to expand");
+          AliDebug(1,"Nothing to expand");
           return;
         }