]> git.uio.no Git - u/mrichter/AliRoot.git/blame - CONTAINERS/TArrayOfArray.h
Correcting sources of warnings
[u/mrichter/AliRoot.git] / CONTAINERS / TArrayOfArray.h
CommitLineData
08edbb90 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
10class TArrayOfArray: public TObject {
11public:
12 virtual void * At(UInt_t index0, UInt_t index1)=0;
13 //get pointer to the object
bc2262d8 14 virtual void Dump() const {TObject::Dump();}
08edbb90 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
633d3715 26class TArrayOfArrayVStack: public TArrayOfArray{
08edbb90 27public:
633d3715 28 TArrayOfArrayVStack();
29 TArrayOfArrayVStack(const char *classname);
30 ~TArrayOfArrayVStack();
08edbb90 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
bc2262d8 38 virtual void Dump() const {TArrayOfArray::Dump();}
08edbb90 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;}
47private:
783ce8a7 48
49 TArrayOfArrayVStack(const TArrayOfArrayVStack & taa);
50 TArrayOfArrayVStack & operator=(const TArrayOfArrayVStack & taa);
51
08edbb90 52 AliObjectArray * fIndex;
53 AliObjectArray * fArray;
633d3715 54 ClassDef(TArrayOfArrayVStack,1)
08edbb90 55};
56
633d3715 57class TArrayOfArrayVList: public TArrayOfArray{
08edbb90 58protected:
59 AliObjectArray fIndex;
60 AliObjectArray fSecondaryIndexes;
61 AliObjectArray fArray;
633d3715 62 ClassDef(TArrayOfArrayVList,1)
08edbb90 63};
64
633d3715 65inline void * TArrayOfArrayVStack::Unchecked1DAt(UInt_t index0, UInt_t index1)
08edbb90 66{
67 // unchecked return
68 return fArray->Unchecked1DAt(((UInt_t*)fIndex->GetArray())[index0]+index1);
69}
70
71#endif
72
73