1 #ifndef TARRAYOFARRAY_H
2 #define TARRAYOFARRAY_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 #include "AliObjectArray.h"
10 class TArrayOfArray: public TObject {
12 virtual void * At(UInt_t index0, UInt_t index1)=0;
13 //get pointer to the object
14 virtual void Dump() const {TObject::Dump();}
15 virtual void Dump(UInt_t index0, UInt_t index1)=0;
16 virtual Int_t Resize(Int_t index, UInt_t newsize)=0;
17 //expand array with index index to newsize
18 virtual UInt_t Push(UInt_t size)=0;
19 //make new array with size - return starting index
20 virtual Int_t ArraySize(UInt_t index)=0;
21 virtual Int_t GetSize()=0;
22 ClassDef(TArrayOfArray,1)
26 class TArrayOfArrayVStack: public TArrayOfArray{
28 TArrayOfArrayVStack();
29 TArrayOfArrayVStack(const char *classname);
30 ~TArrayOfArrayVStack();
31 Bool_t SetClass(const char * classname);
32 virtual void Clear(Option_t * opt="");
33 void * Unchecked1DArray(UInt_t index){return fIndex->Unchecked1DAt(index);}
34 void * Unchecked1DAt(UInt_t index0, UInt_t index1);
36 virtual void * At(UInt_t index0, UInt_t index1);
37 //get pointer to the object
38 virtual void Dump() const {TArrayOfArray::Dump();}
39 virtual void Dump(UInt_t index0, UInt_t index1);
40 virtual Int_t Resize(Int_t index, UInt_t newsize);
41 //expand array with index index to newsize
42 virtual UInt_t Push(UInt_t size);
43 //make new array with size - return starting index
44 virtual Int_t ArraySize(UInt_t index);
45 Int_t ArraySize(){ return fArray->GetSize();}
46 virtual Int_t GetSize(){return (fIndex) ?(Int_t)fIndex->GetSize()-1:0;}
49 TArrayOfArrayVStack(const TArrayOfArrayVStack & taa);
50 TArrayOfArrayVStack & operator=(const TArrayOfArrayVStack & taa);
52 AliObjectArray * fIndex;
53 AliObjectArray * fArray;
54 ClassDef(TArrayOfArrayVStack,1)
57 class TArrayOfArrayVList: public TArrayOfArray{
59 AliObjectArray fIndex;
60 AliObjectArray fSecondaryIndexes;
61 AliObjectArray fArray;
62 ClassDef(TArrayOfArrayVList,1)
65 inline void * TArrayOfArrayVStack::Unchecked1DAt(UInt_t index0, UInt_t index1)
68 return fArray->Unchecked1DAt(((UInt_t*)fIndex->GetArray())[index0]+index1);