33 #include <Riostream.h>
50 fValues(fgkDefaultSize),
86 if (
fValues.At(i) > value )
return i;
107 AliWarningStream() <<
"Resized array." << endl;
161 AliErrorStream() <<
"Cannot revert sorted array." << endl;
166 TArrayI newArray(size);
168 for ( Int_t i = size-1 ; i >= 0 ; i--) {
170 newArray.AddAt(value,idx++);
173 for (Int_t i = 0; i < size ; i++) {
212 AliErrorStream() <<
"Index outside limits" << endl;
226 if ( value < fMinValue || value >
fMaxValue )
230 if (
fValues.At(i) == value )
return true;
Int_t fMinValue
The minimum value in the array.
Bool_t HasValue(Int_t value) const
Int_t fNofValues
Number of values in the array.
Bool_t Add(Int_t value, Bool_t warn=kTRUE)
AliMpArrayI(Bool_t sort=true)
Bool_t fSort
Option to sort the values.
Bool_t Remove(Int_t value)
Helper class for sorted integer array.
TArrayI fValues
Array of values.
Int_t fMaxValue
The maximum value in the array.
Int_t GetValue(Int_t index) const
static const Int_t fgkDefaultSize
Default initial size.
Int_t GetPosition(Int_t value) const