Changeset 7130 for trunk/MagicSoft/Mars/mhbase
- Timestamp:
- 06/03/05 18:02:36 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mhbase
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhbase/MFillH.cc
r6978 r7130 203 203 fHName = hist; 204 204 fParContainer = par; 205 fParContainerName = par->GetName(); 205 if (par) 206 fParContainerName = par->GetName(); 206 207 207 208 AddToBranchList(Form("%s.*", (const char*)ExtractName(hist))); 208 AddToBranchList(Form("%s.*", par->GetName())); 209 if (par) 210 AddToBranchList(Form("%s.*", par->GetName())); 209 211 210 212 if (!title) 211 fTitle = Form("Fill %s from %s", fName.Data(), par ->GetDescriptor().Data());213 fTitle = Form("Fill %s from %s", fName.Data(), par?par->GetDescriptor().Data():"NULL"); 212 214 } 213 215 … … 226 228 227 229 fH = hist; 228 fHName = hist->GetName(); 230 if (hist) 231 fHName = hist->GetName(); 229 232 fParContainerName = par; 230 233 231 AddToBranchList(fH->GetDataMember()); 234 if (fH) 235 AddToBranchList(fH->GetDataMember()); 232 236 if (par) 233 237 AddToBranchList(Form("%s.*", (const char*)ExtractName(par))); … … 236 240 return; 237 241 238 fTitle = Form("Fill %s", hist ->GetDescriptor().Data());242 fTitle = Form("Fill %s", hist ? hist->GetDescriptor().Data() : "NULL"); 239 243 if (!par) 240 244 return; … … 257 261 258 262 fH = hist; 259 fHName = hist->GetName(); 263 if (hist) 264 fHName = hist->GetName(); 260 265 fParContainer = par; 261 fParContainerName = par->GetName(); 262 263 AddToBranchList(fH->GetDataMember()); 264 AddToBranchList(Form("%s.*", par->GetName())); 266 if (par) 267 fParContainerName = par->GetName(); 268 269 if (fH) 270 AddToBranchList(fH->GetDataMember()); 271 if (par) 272 AddToBranchList(Form("%s.*", par->GetName())); 265 273 266 274 if (!title) 267 fTitle = Form("Fill %s from %s", hist->GetDescriptor().Data(), par->GetDescriptor().Data()); 275 fTitle = Form("Fill %s from %s", 276 hist?hist->GetDescriptor().Data():"NULL", 277 par ? par->GetDescriptor().Data():"NULL"); 268 278 } 269 279 -
trunk/MagicSoft/Mars/mhbase/MHMatrix.cc
r6890 r7130 143 143 Int_t MHMatrix::AddColumn(const char *rule) 144 144 { 145 const Int_t idx = fData ? fData->FindRule(rule) : -1; 146 if (idx>=0) 147 return idx; 148 145 149 if (IsValid(fM)) 146 150 { … … 160 164 SetBit(kIsOwner); 161 165 } 162 163 const Int_t idx = fData->FindRule(rule);164 if (idx>=0)165 return idx;166 166 167 167 fData->AddEntry(rule); … … 1262 1262 return kTRUE; 1263 1263 } 1264 1265 // -------------------------------------------------------------------------- 1266 // 1267 // Returns the row pointed to by fNumRow into TVector v 1268 // 1269 void MHMatrix::GetRow(TVector &v) const 1270 { 1271 Int_t ncols = fM.GetNcols(); 1272 1273 v.ResizeTo(ncols); 1274 1275 while (ncols--) 1276 v(ncols) = fM(fRow, ncols); 1277 } -
trunk/MagicSoft/Mars/mhbase/MHMatrix.h
r6890 r7130 73 73 void AddColumns(MDataArray *mat); 74 74 75 //MDataArray *GetColumns() { return fData; } 76 const MDataArray *GetColumns() const { return fData; } 75 77 MDataArray *GetColumns() { return fData; } 76 78 … … 102 104 Double_t operator[](Int_t col) { return fM(fRow, col); } 103 105 106 void GetRow(TVector &v) const; 107 void operator>>(TVector &v) const 108 { 109 GetRow(v); 110 } 111 104 112 Bool_t Fill(MParList *plist, MTask *read, MFilter *filter=NULL); 105 113
Note:
See TracChangeset
for help on using the changeset viewer.