04-mar-2005 NvE Installation scripts named amdgcclib.sh introduced in all /scripts...
[u/mrichter/AliRoot.git] / RALICE / AliObjMatrix.h
CommitLineData
84bb7c66 1#ifndef ALIOBJMATRIX_H
2#define ALIOBJMATRIX_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
ea0b5b7f 8#include "TNamed.h"
84bb7c66 9#include "TObjArray.h"
e604d3a8 10#include "TArrayI.h"
84bb7c66 11
ea0b5b7f 12class AliObjMatrix : public TNamed
84bb7c66 13{
14 public:
261c0caf 15 AliObjMatrix(); // Default constructor
16 virtual ~AliObjMatrix(); // Default destructor
17 virtual void Reset(); // Reset the whole matrix structure
18 virtual void SetOwner(Int_t own=1); // Set the owner flag for the stored objects
19 virtual Int_t GetOwner() const; // Provide the owner flag for the stored objects
20 virtual void SetSwapMode(Int_t swap=1); // Set the swap mode flag for this matrix
21 virtual Int_t GetSwapMode() const; // Provide the swap mode flag for this matrix
22 virtual void EnterObject(Int_t row,Int_t col,TObject* obj); // Enter an object into the matrix
23 void RemoveObject(Int_t row,Int_t col); // Remove object at (row,col) from the matrix
24 void RemoveObjects(TObject* obj,Int_t row=0,Int_t col=0); // Remove specified object(s) from the matrix
25 virtual TObject* GetObject(Int_t row,Int_t col) const; // Provide an object from the matrix
26 virtual Int_t GetMaxRow() const; // Provide the maximum row number index
27 virtual Int_t GetMaxColumn() const; // Provide the maximum column number index
28 virtual Int_t GetNobjects() const; // Provide the number of stored objects
29 virtual TObject* GetObject(Int_t j) const; // Provide pointer to the j-th object
30 virtual TObjArray* GetObjects(); // Provide pointers of all stored onjects
31 Int_t GetNrefs(TObject* obj) const; // Number of stored references to this object
32 Int_t GetIndices(TObject* obj,TArrayI& rows,TArrayI& cols) const; // All (row,col) indices of this object
33 Int_t GetIndices(TObject* obj,Int_t row,TArrayI& cols) const; // Column indices in a specific row
34 Int_t GetIndices(TObject* obj,TArrayI& rows,Int_t col) const; // Row indices in a specific column
84bb7c66 35
36 protected:
c72198f1 37 TObjArray* fRows; // Pointers to the various arrays representing the matrix rows
38 Int_t fOwn; // Flag to indicate whether the objects are owned by the matrix structure
39 Int_t fSwap; // Flag to indicate swapped mode for internal matrix storage
40 Int_t fMaxrow; // The maximum row number index
41 Int_t fMaxcol; // The maximum column number index
42 TObjArray* fObjects; // Linear reference array for fast looping over the stored objects
84bb7c66 43
ea0b5b7f 44 ClassDef(AliObjMatrix,6) // Handling of a matrix structure of objects.
84bb7c66 45};
46#endif