Changeset 4953 for trunk/MagicSoft/Mars/mbase
- Timestamp:
- 09/12/04 20:13:55 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MArray.cc
r4952 r4953 40 40 ClassImp(MArray); 41 41 42 // -------------------------------------------------------------------------- 43 // 44 // Cuts the last entries of an array containing only zeros. 45 // 46 void MArray::StripZeros(TArray &arr) 47 { 48 49 const Int_t n = arr.GetSize(); 50 51 for (Int_t i=n-1; i>=0; i--) 52 if (arr[i] != 0) 53 { 54 arr.Set(i+1); 55 break; 56 } 57 } 58 59 // -------------------------------------------------------------------------- 60 // 61 // Cuts the last entries of an array containing only zeros. 62 // 63 void MArray::StripZeros(MArray &arr) 64 { 65 const Int_t n = arr.GetSize(); 66 67 for (Int_t i=n-1; i>=0; i--) 68 if (arr[i] != 0) 69 { 70 arr.Set(i+1); 71 break; 72 } 73 } 74
Note:
See TracChangeset
for help on using the changeset viewer.