1 #ifndef ALIRECTMATRIX_H
2 #define ALIRECTMATRIX_H
4 /*********************************************************************************/
6 /* Class for rectangular matrix used for */
7 /* millepede2 operation. */
8 /* Author: ruben.shahoyan@cern.ch */
10 /*********************************************************************************/
15 class AliRectMatrix : public TObject {
19 AliRectMatrix(Int_t nrow,Int_t ncol);
20 AliRectMatrix(const AliRectMatrix &src);
21 virtual ~AliRectMatrix();
23 Int_t GetNRows() const {return fNRows;}
24 Int_t GetNCols() const {return fNCols;}
26 Double_t Query(Int_t rown, Int_t coln) const {return operator()(rown,coln);}
28 AliRectMatrix& operator=(const AliRectMatrix& src);
29 Double_t operator()(Int_t rown, Int_t coln) const;
30 Double_t& operator()(Int_t rown, Int_t coln);
31 Double_t* operator()(Int_t row) const {return GetRow(row);}
32 Double_t* GetRow(Int_t row) const {return fRows[row];}
36 virtual void Print(Option_t* option="") const;
40 Int_t fNRows; // Number of rows
41 Int_t fNCols; // Number of columns
42 Double_t **fRows; // pointers on rows
44 ClassDef(AliRectMatrix,0) //Rectangular Matrix Class
47 //___________________________________________________________
48 inline Double_t AliRectMatrix::operator()(Int_t row, Int_t col) const
50 return (const Double_t&) GetRow(row)[col];
53 //___________________________________________________________
54 inline Double_t& AliRectMatrix::operator()(Int_t row, Int_t col)
56 return (Double_t&) fRows[row][col];