Changeset 1829 for trunk/MagicSoft
- Timestamp:
- 03/18/03 18:20:27 (22 years ago)
- Location:
- trunk/MagicSoft/Mars/mhist
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MHMatrix.cc
r1828 r1829 87 87 // -------------------------------------------------------------------------- 88 88 // 89 // Default Constructor 90 // 91 MHMatrix::MHMatrix(const TMatrix &m, const char *name, const char *title) 92 : fNumRow(m.GetNrows()), fM(m), fData(NULL) 93 { 94 fName = name ? name : gsDefName.Data(); 95 fTitle = title ? title : gsDefTitle.Data(); 96 } 97 98 // -------------------------------------------------------------------------- 99 // 89 100 // Constructor. Initializes the columns of the matrix with the entries 90 101 // from a MDataArray … … 689 700 // 690 701 Bool_t MHMatrix::DefRefMatrix(const UInt_t refcolumn, const TH1F &thsh, 691 constInt_t nmaxevts, TMatrix *rest)702 Int_t nmaxevts, TMatrix *rest) 692 703 { 693 704 if (!fM.IsValid()) … … 720 731 return kFALSE; 721 732 } 733 734 if (nmaxevts==0) 735 nmaxevts = fM.GetNrows(); 722 736 723 737 // … … 917 931 // are not interested in this 918 932 // 919 Bool_t MHMatrix::DefRefMatrix( constInt_t nmaxevts, TMatrix *rest)933 Bool_t MHMatrix::DefRefMatrix(Int_t nmaxevts, TMatrix *rest) 920 934 { 921 935 if (!fM.IsValid()) … … 924 938 return kFALSE; 925 939 } 940 941 if (nmaxevts>fM.GetNrows()) 942 { 943 *fLog << err << dbginf << "Number of maximum events exceeds number of events" << endl; 944 return kFALSE; 945 } 946 947 if (nmaxevts<0) 948 { 949 *fLog << err << dbginf << "Number of maximum events < 0" << endl; 950 return kFALSE; 951 } 952 953 if (nmaxevts==0) 954 nmaxevts = fM.GetNrows(); 926 955 927 956 const Int_t nrows = fM.GetNrows(); -
trunk/MagicSoft/Mars/mhist/MHMatrix.h
r1828 r1829 55 55 MHMatrix(const char *name=NULL, const char *title=NULL); 56 56 MHMatrix(MDataArray *mat, const char *name=NULL, const char *title=NULL); 57 MHMatrix(const TMatrix &m, const char *name=NULL, const char *title=NULL); 57 58 ~MHMatrix(); 58 59 … … 100 101 101 102 Bool_t DefRefMatrix(const UInt_t refcolumn, const TH1F &thsh, 102 constInt_t nmaxevts=0, TMatrix *mrest=NULL);103 Bool_t DefRefMatrix( constInt_t nmaxevts=0, TMatrix *mrest=NULL);103 Int_t nmaxevts=0, TMatrix *mrest=NULL); 104 Bool_t DefRefMatrix(Int_t nmaxevts=0, TMatrix *mrest=NULL); 104 105 105 106 ClassDef(MHMatrix, 1) // Multidimensional Matrix to store events
Note:
See TracChangeset
for help on using the changeset viewer.