Changeset 4952 for trunk/MagicSoft
- Timestamp:
- 09/12/04 20:13:21 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mbase
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MArray.cc
r3115 r4952 38 38 #include "MArray.h" 39 39 40 #include <TArrayF.h>41 #include <TArrayD.h>42 43 40 ClassImp(MArray); 44 41 45 // --------------------------------------------------------------------------46 //47 // Cuts the last entries of an array containing only zeros.48 //49 void MArray::StripZeros(TArrayD &arr)50 {51 const Int_t n = arr.GetSize();52 53 for (Int_t i=n-1; i>=0; i--)54 if (arr[i] != 0)55 {56 arr.Set(i+1);57 break;58 }59 }60 61 // --------------------------------------------------------------------------62 //63 // Cuts the last entries of an array containing only zeros.64 //65 void MArray::StripZeros(TArrayF &arr)66 {67 const Int_t n = arr.GetSize();68 69 for (Int_t i=n-1; i>=0; i--)70 if (arr[i] != 0)71 {72 arr.Set(i+1);73 break;74 }75 } -
trunk/MagicSoft/Mars/mbase/MArray.h
r3115 r4952 14 14 #endif 15 15 16 class TArrayF; 17 class TArrayD; 16 class TArray; 18 17 class MArray : public TObject 19 18 { … … 31 30 UInt_t GetSize() const { return fN; } 32 31 virtual void Set(UInt_t n) = 0; 32 33 static void StripZeros(TArray &arr); 34 static void StripZeros(MArray &arr); 33 35 34 static void StripZeros(TArrayF &arr);35 static void StripZeros(TArrayD &arr);36 37 36 ClassDef(MArray, 1) //Abstract array base class for TObject derived Arrays 38 37 };
Note:
See TracChangeset
for help on using the changeset viewer.