Changeset 1600 for trunk/MagicSoft/Mars/mhist
- Timestamp:
- 11/13/02 17:03:19 (22 years ago)
- Location:
- trunk/MagicSoft/Mars/mhist
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MHFadcCam.cc
r1303 r1600 112 112 return kTRUE; 113 113 } 114 115 void MHFadcCam::ResetHistograms() 116 { 117 for (Int_t i=0; i<577; i++) 118 { 119 GetHistHi(i)->Reset(); 120 GetHistLo(i)->Reset(); 121 } 122 } -
trunk/MagicSoft/Mars/mhist/MHFadcCam.h
r1208 r1600 36 36 Bool_t Fill(const MParContainer *par); 37 37 38 void ResetHistograms(); 39 38 40 // 39 41 // FIXME! This should be replaced by a Draw(Option_t)-function -
trunk/MagicSoft/Mars/mhist/MHMatrix.cc
r1593 r1600 614 614 return fData ? fData->GetDataMember() : TString(""); 615 615 } 616 617 // -------------------------------------------------------------------------- 618 // 619 // Return a comma seperated list of all data members used in the matrix. 620 // This is mainly used in MTask::AddToBranchList 621 // 622 void MHMatrix::ReduceNumberOfRows(UInt_t numrows, const TString opt) 623 { 624 UInt_t rows = fM.GetNrows(); 625 626 if (rows==numrows) 627 { 628 *fLog << warn << "Matrix has already the correct number of rows..." << endl; 629 return; 630 } 631 632 Float_t ratio = (Float_t)numrows/fM.GetNrows(); 633 634 if (ratio>=1) 635 { 636 *fLog << warn << "Matrix cannot be enlarged..." << endl; 637 return; 638 } 639 640 Double_t sum = 0; 641 642 UInt_t oldrow = 0; 643 UInt_t newrow = 0; 644 645 while (oldrow<rows) 646 { 647 sum += ratio; 648 649 if (newrow<=(unsigned int)sum) 650 { 651 TVector vold(fM.GetNcols()); 652 vold = TMatrixRow(fM, oldrow); 653 654 TMatrixRow rownew(fM, newrow); 655 rownew = vold; 656 newrow++; 657 } 658 659 oldrow++; 660 } 661 662 /* 663 664 TMatrix m(n, fM.GetNcols()); 665 for (int i=0; i<n; i++) 666 { 667 TVector vold(n); 668 vold = TMatrixRow(fM, idx[i]); 669 670 TMatrixRow rownew(m, i); 671 rownew = vold; 672 } 673 */ 674 675 } -
trunk/MagicSoft/Mars/mhist/MHMatrix.h
r1574 r1600 29 29 TMatrix fM; // Matrix to be filled 30 30 31 TMatrix fM2; //! 31 TMatrix fM2; //! Covariance Matrix 32 32 33 33 MDataArray *fData; // List of data members (columns) … … 89 89 TString GetDataMember() const; 90 90 91 void ReduceNumberOfRows(UInt_t numrows, const TString opt); 92 91 93 ClassDef(MHMatrix, 1) // Multidimensional Matrix to store events 92 94 };
Note:
See TracChangeset
for help on using the changeset viewer.