source: trunk/MagicSoft/Mars/mhist/MHMatrix.h@ 1502

Last change on this file since 1502 was 1489, checked in by tbretz, 22 years ago
*** empty log message ***
File size: 1.4 KB
Line 
1#ifndef MARS_MHMatrix
2#define MARS_MHMatrix
3
4#ifndef ROOT_TMatrix
5#include <TMatrix.h>
6#endif
7#ifndef MARS_MH
8#include "MH.h"
9#endif
10
11class MDataArray;
12
13class MHMatrix : public MH
14{
15protected:
16 Int_t fNumRow; //! Number of dimensions of histogram
17 TMatrix fM; // Matrix to be filled
18
19 TMatrix fM2; //!
20
21 MDataArray *fData; // List of data members (columns)
22
23 enum {
24 kIsOwner = BIT(14)
25 };
26
27 void AddRow();
28
29 Bool_t SetupFill(const MParList *pList);
30 Bool_t Fill(const MParContainer *par);
31 Bool_t Finalize();
32
33 void StreamPrimitive(ofstream &out) const;
34
35public:
36 MHMatrix(const char *name=NULL, const char *title=NULL);
37 MHMatrix(MDataArray *mat, const char *name=NULL, const char *title=NULL);
38 ~MHMatrix();
39
40 void AddColumn(const char *name);
41 void AddColumns(MDataArray *mat);
42
43 MDataArray *GetColumns() { return fData; }
44
45 const TMatrix &GetM() const { return fM; }
46
47 //void Draw(Option_t *opt=NULL);
48 //TObject *DrawClone(Option_t *opt=NULL) const;
49
50 void Print(Option_t *) const;
51
52 const TMatrix *InvertPosDef();
53
54 Double_t CalcDist(const TMatrix &m, const TVector &v, Int_t num = 25) const;
55 Double_t CalcDist(const TVector &v, Int_t num = 25);
56
57 void SetIOwner(Bool_t b=kTRUE) { b ? SetBit(kIsOwner) : ResetBit(kIsOwner); }
58
59 void Reassign();
60
61 ClassDef(MHMatrix, 1) // Multidimensional Matrix to store events
62};
63
64#endif
Note: See TracBrowser for help on using the repository browser.