Ignore:
Timestamp:
09/12/04 20:27:19 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mbase/MArray.cc

    r4954 r4955  
    3737//////////////////////////////////////////////////////////////////////////////
    3838#include "MArray.h"
    39 #include "TArray.h"
    4039
    4140ClassImp(MArray);
    4241
    43 // --------------------------------------------------------------------------
    44 //
    45 //  Cuts the last entries of an array containing only zeros.
    46 //
    47 void MArray::StripZeros(TArray &arr)
    48 {
    49 
    50   const Int_t n = arr.GetSize();
    51  
    52   for (Int_t i=n-1; i>=0; i--)
    53     if (arr[i] != 0)
    54         {
    55           arr.Set(i+1);
    56           break;
    57         }
    58 }
    59 
    60 // --------------------------------------------------------------------------
    61 //
    62 //  Cuts the last entries of an array containing only zeros.
    63 //
    64 void MArray::StripZeros(MArray &arr)
    65 {
    66     const Int_t n = arr.GetSize();
    67 
    68     for (Int_t i=n-1; i>=0; i--)
    69       if (arr[i] != 0)
    70         {
    71           arr.Set(i+1);
    72           break;
    73         }
    74 }
    75 
Note: See TracChangeset for help on using the changeset viewer.