AliRoot Core  a565103 (a565103)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMpArrayI Class Reference

Helper class for sorted integer array. More...

#include <AliMpArrayI.h>

Inheritance diagram for AliMpArrayI:

Public Member Functions

 AliMpArrayI (Bool_t sort=true)
 
 AliMpArrayI (TRootIOCtor *)
 
virtual ~AliMpArrayI ()
 
Bool_t Add (Int_t value, Bool_t warn=kTRUE)
 
Bool_t Remove (Int_t value)
 
Bool_t Revert ()
 
void Reset ()
 
void SetSize (Int_t size)
 
Int_t GetSize () const
 
Int_t GetValue (Int_t index) const
 
Bool_t HasValue (Int_t value) const
 

Private Member Functions

Int_t GetPosition (Int_t value) const
 

Private Attributes

Bool_t fSort
 Option to sort the values. More...
 
Int_t fNofValues
 Number of values in the array. More...
 
TArrayI fValues
 Array of values. More...
 
Int_t fMinValue
 The minimum value in the array. More...
 
Int_t fMaxValue
 The maximum value in the array. More...
 

Static Private Attributes

static const Int_t fgkDefaultSize = 100
 Default initial size. More...
 

Detailed Description

Helper class for sorted integer array.

Author
Ivana Hrivnacova; IPN Orsay

Definition at line 21 of file AliMpArrayI.h.

Constructor & Destructor Documentation

AliMpArrayI::AliMpArrayI ( Bool_t  sort = true)

Standard & default constructor

Definition at line 46 of file AliMpArrayI.cxx.

AliMpArrayI::AliMpArrayI ( TRootIOCtor *  )

IO constructor

Definition at line 59 of file AliMpArrayI.cxx.

AliMpArrayI::~AliMpArrayI ( )
virtual

Destructor

Definition at line 71 of file AliMpArrayI.cxx.

Member Function Documentation

Int_t AliMpArrayI::GetPosition ( Int_t  value) const
private

Return the new positon where the value should be put

Definition at line 81 of file AliMpArrayI.cxx.

Referenced by Add(), and Remove().

Bool_t AliMpArrayI::HasValue ( Int_t  value) const
Bool_t AliMpArrayI::Remove ( Int_t  value)

Remove value from the array

Definition at line 135 of file AliMpArrayI.cxx.

void AliMpArrayI::Reset ( void  )

Reset the array

Definition at line 180 of file AliMpArrayI.cxx.

Referenced by AliMpBusPatch::ResetReadout().

Bool_t AliMpArrayI::Revert ( )

Revert the order of elements

Definition at line 156 of file AliMpArrayI.cxx.

Referenced by AliMpBusPatch::RevertReadout().

void AliMpArrayI::SetSize ( Int_t  size)

Set given size to the array

Definition at line 191 of file AliMpArrayI.cxx.

Referenced by AliMUONTrackerHV::ReportTrips().

Member Data Documentation

const Int_t AliMpArrayI::fgkDefaultSize = 100
staticprivate

Default initial size.

Definition at line 47 of file AliMpArrayI.h.

Referenced by Reset().

Int_t AliMpArrayI::fMaxValue
private

The maximum value in the array.

Definition at line 54 of file AliMpArrayI.h.

Referenced by Add(), HasValue(), and Reset().

Int_t AliMpArrayI::fMinValue
private

The minimum value in the array.

Definition at line 53 of file AliMpArrayI.h.

Referenced by Add(), and Reset().

Int_t AliMpArrayI::fNofValues
private

Number of values in the array.

Definition at line 51 of file AliMpArrayI.h.

Referenced by Add(), GetPosition(), GetSize(), GetValue(), HasValue(), Remove(), and Reset().

Bool_t AliMpArrayI::fSort
private

Option to sort the values.

Definition at line 50 of file AliMpArrayI.h.

Referenced by Add(), and Revert().

TArrayI AliMpArrayI::fValues
private

Array of values.

Definition at line 52 of file AliMpArrayI.h.

Referenced by Add(), GetPosition(), GetValue(), HasValue(), Remove(), Reset(), Revert(), and SetSize().


The documentation for this class was generated from the following files: