]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Add a Reset funcion
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 29 Jan 2009 19:37:14 +0000 (19:37 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 29 Jan 2009 19:37:14 +0000 (19:37 +0000)
TRD/AliTRDarrayADC.cxx
TRD/AliTRDarrayADC.h
TRD/AliTRDarrayDictionary.cxx
TRD/AliTRDarrayDictionary.h
TRD/AliTRDarraySignal.cxx
TRD/AliTRDarraySignal.h

index 91f96ccd504ea1298b3e43520ce3a58e3895c1c7..d1cce1e85e59b0a6644b1a27b952faa644006c48 100644 (file)
@@ -545,3 +545,15 @@ void AliTRDarrayADC::DeleteNegatives()
        }
     }
 }
+//________________________________________________________________________________
+void AliTRDarrayADC::Reset()
+{
+  //
+  // Reset the array, the old contents are deleted
+  // The array keeps the same dimensions as before
+  //
+  memset(fADC,0,sizeof(Short_t)*fNAdim);
+
+}
+
index ca724e167e54f6f8db80a31f465c2c9df037fccc..c31c6beb381153bc52eb5e65dbc85a5aa064d6db 100644 (file)
@@ -42,6 +42,7 @@ class AliTRDarrayADC: public TObject
   Int_t   GetNcol() const {return fNcol;};
   Int_t   GetDim() const {return fNAdim;};
   void    DeleteNegatives();
+  void    Reset();
 
  protected:
 
index 7ee6a1db4210dffa8f25f8cb9667a19453a95cf2..335e212be6a71455f9dbcf1ed69af545cc83be34 100644 (file)
@@ -25,6 +25,7 @@
 /////////////////////////////////////////////////////////
 
 #include "AliTRDarrayDictionary.h"
+#include "TArray.h"
 
 ClassImp(AliTRDarrayDictionary)
 
@@ -328,3 +329,14 @@ void AliTRDarrayDictionary::Expand()
   if(longArr) delete [] longArr;
 
 }
+//________________________________________________________________________________
+void AliTRDarrayDictionary::Reset()
+{
+  //
+  // Reset the array, the old contents are deleted
+  // and the data array elements are set to zero.
+  //
+
+  memset(fDictionary,0,sizeof(Int_t)*fNDdim);
+
+}
index c57ca01a7471ed98da3ffefbdbc38b17bfcbfb08..360d4498f16aa46759ba1d2655418f9f62c3d7e7 100644 (file)
@@ -34,6 +34,7 @@ class AliTRDarrayDictionary: public TObject
   Int_t GetDim() const {return fNDdim;};\r
   void  Compress();\r
   void  Expand();\r
+  void  Reset();\r
 \r
  protected:\r
 \r
index 68749de2dd508ae016c158b7df74d6256f2880d7..25bfd50deb397fb0bf4dcce8a70386efd4ac4a98 100644 (file)
@@ -356,3 +356,14 @@ void AliTRDarraySignal::Expand()
   if(longArr) delete [] longArr;
 
 }
+//________________________________________________________________________________
+void AliTRDarraySignal::Reset()
+{
+  //
+  // Reset the array, the old contents are deleted
+  // The array keeps the same dimensions as before
+  //
+
+  memset(fSignal,0,sizeof(Float_t)*fNdim);
+
+}
index 481e11233bd42abda3a68594d1669d6f5443085f..02c25698adddd98485140403ef9f6810e2290373 100644 (file)
@@ -39,6 +39,7 @@ class AliTRDarraySignal: public TObject
   Int_t   GetOverThreshold(Float_t threshold);
   void    Compress(Float_t minval);
   void    Expand();
+  void    Reset();
 
  protected: