1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
5 // $MpId: AliMpArrayI.h,v 1.4 2006/05/24 13:58:07 ivana Exp $
9 /// \brief Helper class for sorted integer array
11 /// \author Ivana Hrivnacova; IPN Orsay
13 #ifndef ALI_MP_ARRAY_I_H
14 #define ALI_MP_ARRAY_I_H
16 #include "AliMpIntPair.h"
23 class AliMpArrayI : public TObject
26 AliMpArrayI(Bool_t sort = true);
27 AliMpArrayI(TRootIOCtor* /*ioCtor*/);
28 virtual ~AliMpArrayI();
31 Bool_t Add(Int_t value);
32 Bool_t Remove(Int_t value);
35 void SetSize(Int_t size);
38 Int_t GetSize() const;
39 Int_t GetValue(Int_t index) const;
40 Bool_t HasValue(Int_t value) const;
44 Int_t GetPosition(Int_t value) const;
46 // static data members
47 static const Int_t fgkDefaultSize; ///< Default initial size
50 Bool_t fSort; ///< Option to sort the values
51 Int_t fNofValues; ///< Number of values in the array
52 TArrayI fValues; ///< Array of values
53 AliMpIntPair fLimits; ///< The minimum and maximum values in the array
55 ClassDef(AliMpArrayI,1) // Helper class for sorted integer array
58 #endif //ALI_MP_EX_MAP_H