// $Id$
// $MpId: AliMpArrayI.h,v 1.4 2006/05/24 13:58:07 ivana Exp $
-/// \ingroup basic
+/// \ingroup core
/// \class AliMpArrayI
/// \brief Helper class for sorted integer array
///
#include <TObject.h>
#include <TArrayI.h>
-class AliMpIntPair;
-
class TString;
class AliMpArrayI : public TObject
{
public:
- AliMpArrayI();
+ AliMpArrayI(Bool_t sort = true);
AliMpArrayI(TRootIOCtor* /*ioCtor*/);
virtual ~AliMpArrayI();
// methods
- Bool_t Add(Int_t value);
+ Bool_t Add(Int_t value, Bool_t warn=kTRUE);
Bool_t Remove(Int_t value);
+ Bool_t Revert();
+ void Reset();
// set methods
void SetSize(Int_t size);
static const Int_t fgkDefaultSize; ///< Default initial size
// data members
- Int_t fNofValues; ///< Number of values in the array
- TArrayI fValues; ///< Array of values
+ Bool_t fSort; ///< Option to sort the values
+ Int_t fNofValues; ///< Number of values in the array
+ TArrayI fValues; ///< Array of values
+ Int_t fMinValue; ///< The minimum value in the array
+ Int_t fMaxValue; ///< The maximum value in the array
- ClassDef(AliMpArrayI,1) // Helper class for sorted integer array
+ ClassDef(AliMpArrayI,2) // Helper class for sorted integer array
};
#endif //ALI_MP_EX_MAP_H