Changeset 4646 for trunk/MagicSoft/Mars
- Timestamp:
- 08/17/04 12:22:10 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mhbase
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhbase/MHMatrix.cc
r4601 r4646 441 441 { 442 442 TVector col(cols); 443 col = TMatrix Row(fM, i);443 col = TMatrixFRow_const(fM, i); 444 444 445 445 TVector d = evt; … … 588 588 const TArrayI MHMatrix::GetIndexOfSortedColumn(Int_t ncol, Bool_t desc) const 589 589 { 590 TMatrix Columncol(fM, ncol);590 TMatrixFColumn_const col(fM, ncol); 591 591 592 592 const Int_t n = fM.GetNrows(); … … 614 614 TVector vold(fM.GetNcols()); 615 615 for (int i=0; i<n; i++) 616 TMatrix Row(m, i) = vold = TMatrixRow(fM, idx[i]);616 TMatrixFRow(m, i) /*= vold*/ = TMatrixFRow_const(fM, idx[i]); 617 617 618 618 fM = m; … … 696 696 UInt_t newrow = 0; 697 697 698 #if ROOT_VERSION_CODE < ROOT_VERSION(4,00,8) 698 699 TVector vold(fM.GetNcols()); 700 #endif 699 701 while (oldrow<rows) 700 702 { … … 702 704 703 705 if (newrow<=(unsigned int)sum) 706 #if ROOT_VERSION_CODE < ROOT_VERSION(4,00,8) 704 707 TMatrixRow(fM, newrow++) = vold = TMatrixRow(fM, oldrow); 708 #else 709 TMatrixFRow(fM, newrow++) = TMatrixFRow_const(fM, oldrow); 710 #endif 705 711 706 712 oldrow++; … … 749 755 void MHMatrix::CopyCrop(TMatrix &target, const TMatrix &source, Int_t rows) 750 756 { 757 #if ROOT_VERSION_CODE < ROOT_VERSION(4,00,8) 751 758 TVector v(source.GetNcols()); 752 759 #endif 753 760 target.ResizeTo(rows, source.GetNcols()); 754 761 for (Int_t ir=0; ir<rows; ir++) 762 #if ROOT_VERSION_CODE < ROOT_VERSION(4,00,8) 755 763 TMatrixRow(target, ir) = v = TMatrixRow(source, ir); 764 #else 765 TMatrixFRow(target, ir) = TMatrixFRow_const(source, ir); 766 #endif 756 767 } 757 768 … … 879 890 // 880 891 Int_t ir; 892 #if ROOT_VERSION_CODE < ROOT_VERSION(4,00,8) 881 893 TVector vold(fM.GetNcols()); 894 #endif 882 895 for (ir=0; ir<nrows; ir++) 883 896 { … … 887 900 if (cumulweight[indref]<=0.5) 888 901 { 902 #if ROOT_VERSION_CODE < ROOT_VERSION(4,00,8) 889 903 TMatrixRow(mrest, evtcount2++) = vold = TMatrixRow(fM, ind[ir]); 904 #else 905 TMatrixFRow(mrest, evtcount2++) = TMatrixFRow_const(fM, ind[ir]); 906 #endif 890 907 continue; 891 908 } … … 895 912 break; 896 913 914 #if ROOT_VERSION_CODE < ROOT_VERSION(4,00,8) 897 915 TMatrixRow(mnewtmp, evtcount1) = vold = TMatrixRow(fM, ind[ir]); 916 #else 917 TMatrixFRow(mnewtmp, evtcount1) = TMatrixFRow_const(fM, ind[ir]); 918 #endif 898 919 } 899 920 900 921 for (/*empty*/; ir<nrows; ir++) 922 #if ROOT_VERSION_CODE < ROOT_VERSION(4,00,8) 901 923 TMatrixRow(mrest, evtcount2++) = vold = TMatrixRow(fM, ind[ir]); 924 #else 925 TMatrixFRow(mrest, evtcount2++) = TMatrixFRow_const(fM, ind[ir]); 926 #endif 902 927 903 928 // … … 1002 1027 // select events (distribution after renormalization) 1003 1028 // 1029 #if ROOT_VERSION_CODE < ROOT_VERSION(4,00,8) 1004 1030 TVector vold(fM.GetNcols()); 1031 #endif 1005 1032 for (Int_t ir=0; ir<nmaxevts; ir++) 1033 #if ROOT_VERSION_CODE < ROOT_VERSION(4,00,8) 1006 1034 TMatrixRow(mnewtmp, evtcount1++) = vold = TMatrixRow(fM, ind[ir]); 1035 #else 1036 TMatrixFRow(mnewtmp, evtcount1++) = TMatrixFRow_const(fM, ind[ir]); 1037 #endif 1007 1038 1008 1039 for (Int_t ir=nmaxevts; ir<nrows; ir++) 1040 #if ROOT_VERSION_CODE < ROOT_VERSION(4,00,8) 1009 1041 TMatrixRow(mrest, evtcount2++) = vold = TMatrixRow(fM, ind[ir]); 1042 #else 1043 TMatrixFRow(mrest, evtcount2++) = TMatrixFRow_const(fM, ind[ir]); 1044 #endif 1010 1045 1011 1046 // … … 1119 1154 1120 1155 TVector v(fM.GetNcols()); 1156 #if ROOT_VERSION_CODE < ROOT_VERSION(4,00,8) 1121 1157 TVector tmp(fM.GetNcols()); 1158 #endif 1122 1159 for (Int_t irow = 0; irow<fNumRows; irow++) 1123 1160 { 1124 1161 const Int_t jrow = rnd.Integer(fNumRows); 1125 1162 1163 #if ROOT_VERSION_CODE < ROOT_VERSION(4,00,8) 1126 1164 v = TMatrixRow(fM, irow); 1127 1165 TMatrixRow(fM, irow) = tmp = TMatrixRow(fM, jrow); 1128 1166 TMatrixRow(fM, jrow) = v; 1167 #else 1168 v = TMatrixFRow_const(fM, irow); 1169 TMatrixFRow(fM, irow) = TMatrixFRow_const(fM, jrow); 1170 TMatrixFRow(fM, jrow) = v; 1171 #endif 1129 1172 } 1130 1173 … … 1165 1208 TMatrix m(fM); 1166 1209 1210 #if ROOT_VERSION_CODE < ROOT_VERSION(4,00,8) 1211 TVector vold(ncol); 1212 #endif 1213 1167 1214 const Int_t ncol=fM.GetNcols(); 1168 TVector vold(ncol);1169 1215 int irow=0; 1170 1216 … … 1176 1222 int jcol; 1177 1223 for (jcol=0; jcol<ncol; jcol++) 1178 if (!TMath::Finite( vold(jcol)))1224 if (!TMath::Finite(row(jcol))) 1179 1225 break; 1180 1226 1181 1227 if (jcol==ncol) 1228 #if ROOT_VERSION_CODE < ROOT_VERSION(4,00,8) 1182 1229 TMatrixRow(fM, irow++) = vold = row; 1230 #else 1231 TMatrixFRow(fM, irow++) = row; 1232 #endif 1183 1233 else 1184 1234 *fLog << warn << "Warning - MHMatrix::RemoveInvalidRows: row #" << i<< " removed." << endl; -
trunk/MagicSoft/Mars/mhbase/MHMatrix.h
r4601 r4646 12 12 #include "MH.h" 13 13 #endif 14 15 #include <TArrayF.h>16 14 17 15 class TArrayI;
Note:
See TracChangeset
for help on using the changeset viewer.