Changeset 9576
- Timestamp:
- 04/22/10 11:43:42 (15 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r9574 r9576 18 18 19 19 -*-*- END OF LINE -*-*- 20 21 2010/04/22 Thomas Bretz 22 23 * showplot.cc: 24 - added --debug-mem option 25 26 * mbase/MParSpline.cc, mhbase/MH3.cc, mhbase/MHn.cc, 27 mhflux/MHAlpha.cc, mhist/MHCamEvent.cc: 28 - added missing call to the RecursiveRemove of the base class 29 30 * mfileio/MReadTree.cc: 31 - In the case Notify failed since about two years accidentaly 32 kTRUE instead of kERROR was returned 33 34 * mfileio/MWriteRootFile.cc: 35 - added some more debug output 36 37 * mhflux/MAlphaFitter.cc: 38 - Return if fit failed 39 40 * mhflux/MHPhi.cc: 41 - avoid inf and nan when producing histogram (the divisor could 42 have been zero in case of the inetgral of an empty histogram) 43 44 20 45 21 46 2010/04/21 Thomas Bretz … … 47 72 48 73 74 2010/04/20 Thomas Bretz 75 76 * mfileio/MReadTree.cc: 77 - no error was returned anymore when Notify() failed. Fixed. 78 79 80 49 81 2010/04/19 Thomas Bretz 50 82 51 * m ase/MStatusArray.cc:83 * mbase/MStatusArray.cc: 52 84 - added a workaround to prevent crashes in case of double 53 85 deleteion of the fHistogram in TGraphs -
trunk/MagicSoft/Mars/mbase/MParSpline.cc
r9518 r9576 327 327 if (obj==fSpline) 328 328 fSpline=0; 329 } 329 330 MParContainer::RecursiveRemove(obj); 331 } -
trunk/MagicSoft/Mars/mfileio/MReadTree.cc
r9103 r9576 1001 1001 case MChain::kFatalError: 1002 1002 *fLog << err << GetDescriptor() << " - ERROR: Notify() failed." << endl; 1003 return k TRUE;1003 return kERROR; 1004 1004 case MChain::kCannotAccessFile: 1005 1005 *fLog << err << GetDescriptor() << " - ERROR: TChain::LoadTree is unable to access requested file." << endl; -
trunk/MagicSoft/Mars/mfileio/MWriteRootFile.cc
r9472 r9576 716 716 if (!b->GetBranch()->Fill()) 717 717 { 718 *fLog << err << "ERROR - Zero bytes written to branch '" << b->GetBranch()->GetName() << "'... abort." << endl;718 *fLog << err << "ERROR - MWriteRootFile: Zero bytes written to branch '" << b->GetBranch()->GetName() << "'... abort." << endl; 719 719 return kFALSE; 720 720 } … … 730 730 { 731 731 TTree *t = (TTree*)fTrees[idx]; 732 if (!t) 733 { 734 *fLog << err << "ERROR - MWriteRootFile: The Tree with index " << idx << endl; 735 *fLog << " in fTrees is NULL. This should never happen. Please send" << endl; 736 *fLog << " a bug report." << endl; 737 return kFALSE; 738 } 732 739 733 740 // … … 746 753 if (!t->Fill()) 747 754 { 748 *fLog << err << "ERROR - Zero bytes written to tree '" << t->GetName() << "'... abort." << endl;755 *fLog << err << "ERROR - MWriteRootFiole: Zero bytes written to tree '" << t->GetName() << "'... abort." << endl; 749 756 return kFALSE; 750 757 } -
trunk/MagicSoft/Mars/mhbase/MH3.cc
r9518 r9576 1306 1306 if (obj==fHist) 1307 1307 fHist = 0; 1308 } 1308 1309 MH::RecursiveRemove(obj); 1310 } -
trunk/MagicSoft/Mars/mhbase/MHn.cc
r9518 r9576 609 609 fHist[i]->RecursiveRemove(obj); 610 610 } 611 } 611 612 MH::RecursiveRemove(obj); 613 } -
trunk/MagicSoft/Mars/mhflux/MAlphaFitter.cc
r9525 r9576 208 208 // Q quiet mode 209 209 // E Perform better Errors estimation using Minos technique 210 h.Fit(fFunc, "NQI", "", fBgMin, fBgMax); 210 if (h.Fit(fFunc, "NQI", "", fBgMin, fBgMax)) 211 return kFALSE; 212 211 213 fChiSqBg = fFunc->GetChisquare()/fFunc->GetNDF(); 212 214 -
trunk/MagicSoft/Mars/mhflux/MHAlpha.cc
r9411 r9576 1153 1153 if (obj==fOffData) 1154 1154 fOffData = 0; 1155 } 1155 1156 MH::RecursiveRemove(obj); 1157 } -
trunk/MagicSoft/Mars/mhflux/MHPhi.cc
r9153 r9576 355 355 TVirtualPad *pad4 = gPad->GetPad(4); 356 356 357 const Double_t i2 = fHInhom.Integral(); 358 /* 357 359 Double_t sig2 = 0; 358 360 Double_t bg2 = 0; 359 361 Double_t f2 = 1; 362 */ 360 363 TH1D *htemp = pad1 ? dynamic_cast<TH1D*>(pad1->FindObject("Template")) : NULL; 361 364 if (htemp) … … 373 376 fHPhi.Copy(*res); 374 377 378 const Double_t i0 = res->Integral(fNumBinsSignal+1, 9999); 379 const Double_t i1 = fHInhom.Integral(fNumBinsSignal+1, 9999); 380 const Double_t i3 = htemp->Integral(); 381 const Double_t i4 = htemp->Integral(fNumBinsSignal+1, 9999); 382 375 383 // Scale inhomogeneity to match the phi-plot in the off-region 376 sc1 = res->Integral(fNumBinsSignal+1, 9999)/fHInhom.Integral(fNumBinsSignal+1, 9999);384 sc1 = i1==0 ? 0 : i0/i1; 377 385 // Scale inhomogeneity to match the phi-plot in the off-region 378 sc2 = fHInhom.Integral()/htemp->Integral();386 sc2 = i3==0 ? 0 : i2/i3; 379 387 380 388 res->Add(&fHInhom, -sc1); … … 383 391 res->SetDirectory(0); 384 392 385 htemp->Scale( res->Integral(fNumBinsSignal+1, 9999)/htemp->Integral(fNumBinsSignal+1, 9999));386 387 sig2 = res->Integral(1, fNumBinsSignal);388 bg2 = fHPhi.Integral(fNumBinsSignal+1, 9999);389 f2 = htemp->Integral(1, fNumBinsSignal)/htemp->Integral(fNumBinsSignal+1, 9999);393 htemp->Scale(i4==0 ? 0 : i0/i4); 394 395 //sig2 = res->Integral(1, fNumBinsSignal); 396 //bg2 = fHPhi.Integral(fNumBinsSignal+1, 9999); 397 //f2 = htemp->Integral(1, fNumBinsSignal)/i4; 390 398 } 391 399 … … 403 411 if (htemp) 404 412 { 413 const Double_t integ = htemp->Integral(); 414 405 415 fHTemplate.Copy(*htemp); 406 htemp->Scale( fHInhom.Integral()/htemp->Integral());416 htemp->Scale(integ==0 ? 0 : i2/integ); 407 417 htemp->SetName("Template"); 408 418 htemp->SetDirectory(0); -
trunk/MagicSoft/Mars/mhist/MHCamEvent.cc
r9518 r9576 409 409 if (obj==fSum) 410 410 fSum = 0; 411 } 411 412 MH::RecursiveRemove(obj); 413 } -
trunk/MagicSoft/Mars/showplot.cc
r9276 r9576 3 3 #include <TGClient.h> 4 4 #include <TRint.h> 5 #include <TObjectTable.h> 5 6 6 7 #include "MLog.h" … … 68 69 gLog << " --auto-size Determin optimum size (not available in batch mode)" << endl; 69 70 gLog << endl; 71 gLog << " --debug-mem Debug memory usage" << endl; 70 72 gLog << " --version, -V Show startup message with version number" << endl; 71 73 gLog << " -?, -h, --help This help" << endl; … … 165 167 const Bool_t kBatch = arg.HasOnlyAndRemove("-b"); 166 168 const Bool_t kRoot = arg.HasOnlyAndRemove("-r"); 169 const Bool_t kDebugMem = arg.HasOnlyAndRemove("--debug-mem"); 167 170 168 171 const Int_t kTab = arg.GetIntAndRemove("--tab=", -1); … … 231 234 return 3; 232 235 } 236 237 if (kDebugMem) 238 TObject::SetObjectStat(kTRUE); 233 239 234 240 // … … 314 320 app->Run(kFALSE); 315 321 delete app; 322 323 if (TObject::GetObjectStat()) 324 { 325 TObject::SetObjectStat(kFALSE); 326 gObjectTable->Print(); 327 } 328 316 329 return 0; 317 330 }
Note:
See TracChangeset
for help on using the changeset viewer.