Changeset 3112 for trunk/MagicSoft/Mars/mbase
- Timestamp:
- 02/12/04 11:34:32 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mbase
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MArray.cc
r3105 r3112 47 47 // Cuts the last entries of an array containing only zeros. 48 48 // 49 void MArray::CutEdges(TArrayD *arr)49 void MArray::CutEdges(TArrayD &arr) 50 50 { 51 52 Int_t i; 53 54 for (i=arr->GetSize()-1;i>=0;i--) 55 if (arr->At(i) != 0) 56 { 57 arr->Set(i+1); 58 break; 59 } 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 } 60 59 } 61 60 … … 64 63 // Cuts the last entries of an array containing only zeros. 65 64 // 66 void MArray::CutEdges(TArrayF *arr)65 void MArray::CutEdges(TArrayF &arr) 67 66 { 68 69 Int_t i; 70 71 for (i=arr->GetSize()-1;i>=0;i--) 72 if (arr->At(i) != 0) 73 { 74 arr->Set(i+1); 75 break; 76 } 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 } 77 75 } 78 -
trunk/MagicSoft/Mars/mbase/MArray.h
r3105 r3112 32 32 virtual void Set(UInt_t n) = 0; 33 33 34 static void CutEdges(TArrayF *arr); 35 static void CutEdges(TArrayD *arr); 36 34 static void CutEdges(TArrayF &arr); 35 static void CutEdges(TArrayD &arr); 37 36 38 37 ClassDef(MArray, 1) //Abstract array base class for TObject derived Arrays
Note:
See TracChangeset
for help on using the changeset viewer.