Changeset 1524 for trunk/MagicSoft/Mars/mhist/MHMatrix.h
- Timestamp:
- 09/16/02 10:10:17 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MHMatrix.h
r1511 r1524 1 1 #ifndef MARS_MHMatrix 2 2 #define MARS_MHMatrix 3 4 #ifdef MARS_MLogManip 5 #error Please make ensure that MLogManip.h are included _after_ MHMatrix.h 6 #endif 3 7 4 8 #ifndef ROOT_TMatrix … … 10 14 11 15 class TArrayI; 16 17 class MTask; 18 class MParList; 12 19 class MDataArray; 13 20 14 21 class MHMatrix : public MH 15 22 { 16 protected: 23 private: 24 static const TString gsDefName; //! Default Name 25 static const TString gsDefTitle; //! Default Title 26 17 27 Int_t fNumRow; //! Number of dimensions of histogram 28 Int_t fRow; //! Present row 18 29 TMatrix fM; // Matrix to be filled 19 30 … … 23 34 24 35 enum { 25 kIsOwner = BIT(14) 36 kIsOwner = BIT(14), 37 kIsLocked = BIT(16) 26 38 }; 27 39 … … 39 51 ~MHMatrix(); 40 52 41 void AddColumn(const char *name); 53 void Lock() { SetBit(kIsLocked); } 54 void Unlock() { ResetBit(kIsLocked); } 55 56 Int_t AddColumn(const char *name); 42 57 void AddColumns(MDataArray *mat); 43 58 … … 45 60 46 61 const TMatrix &GetM() const { return fM; } 62 63 Bool_t IsValid() const { return fM.IsValid(); } 64 Int_t GetNumRows() const { return fNumRow; } 47 65 48 66 //void Draw(Option_t *opt=NULL); … … 56 74 Double_t CalcDist(const TVector &v, Int_t num = 25); 57 75 58 void Set IOwner(Bool_t b=kTRUE) { b ? SetBit(kIsOwner) : ResetBit(kIsOwner); }76 void SetOwner(Bool_t b=kTRUE) { b ? SetBit(kIsOwner) : ResetBit(kIsOwner); } 59 77 60 78 void Reassign(); … … 63 81 void SortMatrixByColumn(Int_t ncol=0, Bool_t desc=kTRUE); 64 82 83 Bool_t SetNumRow(Int_t row) { if (row>=fNumRow || row<0) return kFALSE; fRow = row; return kTRUE; } 84 Int_t GetNumRow() const { return fRow; }; 85 Double_t operator[](Int_t col) { return fM(fRow, col); } 86 87 Bool_t Fill(MParList *plist, MTask *read); 88 65 89 ClassDef(MHMatrix, 1) // Multidimensional Matrix to store events 66 90 };
Note:
See TracChangeset
for help on using the changeset viewer.