]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliRectMatrix.h
The check for save file was blocking the route to the checker
[u/mrichter/AliRoot.git] / STEER / AliRectMatrix.h
CommitLineData
de34b538 1#ifndef ALIRECTMATRIX_H
2#define ALIRECTMATRIX_H
3
4#include "TObject.h"
5class TString;
6
7class AliRectMatrix : public TObject {
8 //
9 public:
10 AliRectMatrix();
11 AliRectMatrix(Int_t nrow,Int_t ncol);
12 AliRectMatrix(const AliRectMatrix &src);
13 virtual ~AliRectMatrix();
14 //
15 Int_t GetNRows() const {return fNRows;}
16 Int_t GetNCols() const {return fNCols;}
17 //
18 Double_t Query(Int_t rown, Int_t coln) const {return operator()(rown,coln);}
19
20 AliRectMatrix& operator=(const AliRectMatrix& src);
21 Double_t operator()(Int_t rown, Int_t coln) const;
22 Double_t& operator()(Int_t rown, Int_t coln);
23 Double_t* operator()(Int_t row) const {return GetRow(row);}
24 Double_t* GetRow(Int_t row) const {return fRows[row];}
25 //
26 void Reset();
27 //
28 virtual void Print(Option_t* option="") const;
29 //
30 protected:
31 //
32 Int_t fNRows; // Number of rows
33 Int_t fNCols; // Number of columns
34 Double_t **fRows; // pointers on rows
35 //
36 ClassDef(AliRectMatrix,0) //Rectangular Matrix Class
37};
38
39//___________________________________________________________
40inline Double_t AliRectMatrix::operator()(Int_t row, Int_t col) const
41{
42 return (const Double_t&) GetRow(row)[col];
43}
44
45//___________________________________________________________
46inline Double_t& AliRectMatrix::operator()(Int_t row, Int_t col)
47{
48 return (Double_t&) fRows[row][col];
49}
50
51
52#endif