Changeset 6890 for trunk/MagicSoft/Mars/mhbase
- Timestamp:
- 03/29/05 09:56:16 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mhbase
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhbase/MH.cc
r5994 r6890 664 664 Double_t min = FLT_MAX; 665 665 666 const TAxis &axex = *((TH1&)h).GetXaxis();667 const TAxis &axey = *((TH1&)h).GetYaxis();668 const TAxis &axez = *((TH1&)h).GetZaxis();669 670 for (int iz=1; iz<= axez.GetNbins(); iz++)671 for (int iy=1; iy<= axey.GetNbins(); iy++)672 for (int ix=1; ix<= axex.GetNbins(); ix++)666 const Int_t nx = h.GetXaxis()->GetNbins(); 667 const Int_t ny = h.GetYaxis()->GetNbins(); 668 const Int_t nz = h.GetZaxis()->GetNbins(); 669 670 for (int iz=1; iz<=nz; iz++) 671 for (int iy=1; iy<=ny; iy++) 672 for (int ix=1; ix<=nx; ix++) 673 673 { 674 674 const Double_t v = h.GetBinContent(h.GetBin(ix, iy, iz)); -
trunk/MagicSoft/Mars/mhbase/MHMatrix.cc
r5832 r6890 143 143 Int_t MHMatrix::AddColumn(const char *rule) 144 144 { 145 if ( fM.IsValid())145 if (IsValid(fM)) 146 146 { 147 147 *fLog << warn << "Warning - matrix is already in use. Can't add a new column... skipped." << endl; … … 173 173 void MHMatrix::AddColumns(MDataArray *matrix) 174 174 { 175 if ( fM.IsValid())175 if (IsValid(fM)) 176 176 { 177 177 *fLog << warn << "Warning - matrix is already in use. Can't add new columns... skipped." << endl; … … 224 224 return; 225 225 226 if (! fM.IsValid())226 if (!IsValid(fM)) 227 227 { 228 228 fM.ResizeTo(1, fData->GetNumEntries()); … … 525 525 Double_t MHMatrix::CalcDist(const TVector &evt, Int_t num) 526 526 { 527 if (! fM2.IsValid())528 { 529 if (! fM.IsValid())527 if (!IsValid(fM2)) 528 { 529 if (!IsValid(fM)) 530 530 { 531 531 *fLog << err << "MHMatrix::CalcDist - ERROR: fM not valid." << endl; … … 803 803 Int_t nmaxevts, TMatrix *rest) 804 804 { 805 if (! fM.IsValid())805 if (!IsValid(fM)) 806 806 { 807 807 *fLog << err << dbginf << "Matrix not initialized" << endl; … … 1001 1001 Bool_t MHMatrix::DefRefMatrix(Int_t nmaxevts, TMatrix *rest) 1002 1002 { 1003 if (! fM.IsValid())1003 if (!IsValid(fM)) 1004 1004 { 1005 1005 *fLog << err << dbginf << "Matrix not initialized" << endl; … … 1113 1113 Int_t MHMatrix::ReadEnv(const TEnv &env, TString prefix, Bool_t print) 1114 1114 { 1115 if ( fM.IsValid())1115 if (IsValid(fM)) 1116 1116 { 1117 1117 *fLog << err << "ERROR - matrix is already in use. Can't add a new column from TEnv... skipped." << endl; -
trunk/MagicSoft/Mars/mhbase/MHMatrix.h
r5832 r6890 44 44 45 45 void AddRow(); 46 Bool_t IsValid(const TMatrix &m) const 47 { 48 return m.GetNrows()>0 && m.IsValid(); 49 } 46 50 47 51 Bool_t SetupFill(const MParList *pList); … … 73 77 const TMatrix &GetM() const { return fM; } 74 78 75 Bool_t IsValid() const { return fM.IsValid(); }79 Bool_t IsValid() const { return IsValid(fM); } 76 80 Int_t GetNumRows() const { return fM.GetNrows(); } 77 81
Note:
See TracChangeset
for help on using the changeset viewer.