Ignore:
Timestamp:
09/16/02 10:10:17 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhist/MHMatrix.h

    r1511 r1524  
    11#ifndef MARS_MHMatrix
    22#define MARS_MHMatrix
     3
     4#ifdef MARS_MLogManip
     5#error Please make ensure that MLogManip.h are included _after_ MHMatrix.h
     6#endif
    37
    48#ifndef ROOT_TMatrix
     
    1014
    1115class TArrayI;
     16
     17class MTask;
     18class MParList;
    1219class MDataArray;
    1320
    1421class MHMatrix : public MH
    1522{
    16 protected:
     23private:
     24    static const TString gsDefName;  //! Default Name
     25    static const TString gsDefTitle; //! Default Title
     26
    1727    Int_t   fNumRow;    //! Number of dimensions of histogram
     28    Int_t   fRow;       //! Present row
    1829    TMatrix fM;         // Matrix to be filled
    1930
     
    2334
    2435    enum {
    25         kIsOwner = BIT(14)
     36        kIsOwner  = BIT(14),
     37        kIsLocked = BIT(16)
    2638    };
    2739
     
    3951    ~MHMatrix();
    4052
    41     void AddColumn(const char *name);
     53    void Lock()   { SetBit(kIsLocked); }
     54    void Unlock() { ResetBit(kIsLocked); }
     55
     56    Int_t AddColumn(const char *name);
    4257    void AddColumns(MDataArray *mat);
    4358
     
    4560
    4661    const TMatrix &GetM() const { return fM; }
     62
     63    Bool_t IsValid() const { return fM.IsValid(); }
     64    Int_t  GetNumRows() const { return fNumRow; }
    4765
    4866    //void Draw(Option_t *opt=NULL);
     
    5674    Double_t CalcDist(const TVector &v, Int_t num = 25);
    5775
    58     void SetIOwner(Bool_t b=kTRUE) { b ? SetBit(kIsOwner) : ResetBit(kIsOwner); }
     76    void SetOwner(Bool_t b=kTRUE) { b ? SetBit(kIsOwner) : ResetBit(kIsOwner); }
    5977
    6078    void Reassign();
     
    6381    void SortMatrixByColumn(Int_t ncol=0, Bool_t desc=kTRUE);
    6482
     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
    6589    ClassDef(MHMatrix, 1) // Multidimensional Matrix to store events
    6690};
Note: See TracChangeset for help on using the changeset viewer.