]> git.uio.no Git - u/mrichter/AliRoot.git/blob - CONTAINERS/TArrayOfArray.h
Correcting sources of warnings
[u/mrichter/AliRoot.git] / CONTAINERS / TArrayOfArray.h
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                               */
5
6 /* $Id$ */
7 #include "TObject.h"
8 #include "AliObjectArray.h"
9
10 class TArrayOfArray: public TObject { 
11 public:    
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) 
23 };
24
25
26 class TArrayOfArrayVStack: public TArrayOfArray{
27 public:  
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);
35   //
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;}
47 private:
48
49   TArrayOfArrayVStack(const TArrayOfArrayVStack & taa);
50   TArrayOfArrayVStack & operator=(const TArrayOfArrayVStack & taa);
51
52   AliObjectArray * fIndex;
53   AliObjectArray * fArray;
54   ClassDef(TArrayOfArrayVStack,1) 
55 };
56
57 class TArrayOfArrayVList: public TArrayOfArray{
58 protected:
59   AliObjectArray  fIndex;
60   AliObjectArray  fSecondaryIndexes;
61   AliObjectArray  fArray;
62   ClassDef(TArrayOfArrayVList,1) 
63 };
64
65 inline void * TArrayOfArrayVStack::Unchecked1DAt(UInt_t index0, UInt_t index1)
66 {
67   // unchecked return
68   return fArray->Unchecked1DAt(((UInt_t*)fIndex->GetArray())[index0]+index1);
69 }
70
71 #endif
72   
73