Changeset 5143 for trunk/MagicSoft/Mars/mhbase/MH.cc
- Timestamp:
- 09/28/04 12:25:50 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhbase/MH.cc
r5060 r5143 483 483 return; 484 484 485 const Bool_t haserr = h.GetSumw2N()>0; 486 485 487 const Int_t n0 = h.GetNbinsX(); 486 488 if (n0<2) … … 488 490 489 491 TArrayD val(n0-1); 490 TArrayD err( n0-1);492 TArrayD err(haserr ? n0-1 : 0); 491 493 for (int i=1; i<n0; i++) 492 494 { 493 495 val[i-1] = h.GetBinContent(i+1); 494 err[i-1] = h.GetBinError(i+1); 496 if (haserr) 497 err[i-1] = h.GetBinError(i+1); 495 498 } 496 499 … … 505 508 { 506 509 h.SetBinContent(i, val[i-1]); 507 h.SetBinError(i, err[i-1]); 510 if (haserr) 511 h.SetBinError(i, err[i-1]); 508 512 } 509 513 }
Note:
See TracChangeset
for help on using the changeset viewer.