Changeset 8709
- Timestamp:
- 08/25/07 16:30:26 (17 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r8704 r8709 20 20 21 21 22 2007/08/25 Thomas Bretz 23 24 * sponde.cc: 25 - check for write permissionbefore job is started 26 27 * sponde.rc, sponde_onoff.rc: 28 - cosmetics to comment 29 30 * macros/train/traindisp.C: 31 - better order of comments 32 33 * manalysis/MParameterCalc.[h,cc]: 34 - print name of output container 35 - allow setting name of output container from resource file 36 37 * mbase/MStatusDisplay.cc: 38 - added sanity check for batch mode in SetProgressBarPosition 39 40 * mfbase/MFDataPhrase.[h,cc]: 41 - initialize new data member fDefault in constructors 42 - increased class version number by one 43 44 * mhbase/MH.cc: 45 - do not divide by zero in SetBinomialErrors 46 47 * mhbase/MH3.[h,cc]: 48 - automatically set more log labels and suppress exponent 49 50 * mhbase/MHn.cc: 51 - set margin between new tabs in Divide to a small value 52 53 * mhflux/MHCollectionArea.cc: 54 - new default energy binning based on the typical simulation range 55 56 * mhflux/MHEnergyEst.cc: 57 - new default energy binning based on the typical simulation range 58 - set the impact binning to one bis as a default for speed 59 reasons. It is normally not used at all 60 - added two blue lines at the zero-bias level for convinience 61 62 * mhflux/MMcSpectrumWeight.cc: 63 - small cosmetics to Print-output 64 65 * mjobs/MJCut.cc: 66 - renamed the instances of the Calc* tasks 67 - store all three taskenvs 68 69 * mjobs/MJSpectrum.[h,cc]: 70 - handle a CalcDisp-task gotten from ganymed properly 71 - do not reexecute CalcHaronness for data 72 - renamed the instances of the Calc* tasks 73 74 * msql/MSQLMagic.cc, msql/MSQLServer.cc: 75 - delete created TSQLRow. They are not deleted automatically 76 77 78 22 79 2007/08/24 Thomas Bretz 23 80 … … 59 116 - it turned out that we use 1/2 and not 0/1 as expected 60 117 61 118 * ganymed.rc, ganymed_onoff.rc, ganymed_wobble.rc: 119 - updated some comments 120 - added new CutT 121 122 * sponde.rc, sponde_onoff.rc: 123 - updated with thousands of comments 124 - adapted to new sponde respources 125 - added examples for missing resources 126 - added a new energy estimation formula which can be used instead 127 of using the random forest 128 129 * macros/optim/optimonoff.C, macros/optim/optimwobble.C: 130 - updated with the latest cuts and some comments 131 132 * macros/train/traindisp.C: 133 - updated with the latest knowledge and cuts 134 - updated with more examples 135 136 * mfbase/MFDataPhrase.[h,cc]: 137 - added a default value which can be used if no phrase is setup 138 - allow to use a constrcutor without phrase but name and title 139 140 * mjobs/MJCut.cc: 141 - removed SetAllowEmpty from CutT 142 - initialize CutT with no phrase instead of an empty one 143 144 * mjobs/MJSpectrum.h: 145 - removed obsolete function definition for IntermediateLoop 146 147 * mranforest/MRanForestCalc.cc: 148 - if weights are used output the sum of the weights for control 149 purpose 150 151 * datacenter/macros/plotdb.C, datacenter/macros/plotoptical.C, 152 datacenter/macros/plotrundb.C: 153 - delete TSQLRow if allocated 62 154 63 155 … … 182 274 * datacenter/scripts/runcallisto 183 275 - modified staging of files 184 276 185 277 * datacenter/scripts/runstar 186 278 - corrected server and added logfile entry for staging of files -
trunk/MagicSoft/Mars/NEWS
r8704 r8709 226 226 positions have disappeared. 227 227 228 - ganymed: There is a new tab "CutT" it contains the VsSize plots 229 with the CutT, whihc is defined in ganymed.rc, applied. It 230 is resonable to use your theta-cut for it, to see if there is 231 something strange (sparks!) in your signal-region. 232 228 233 - optim, sponde: should now properly support three off-regions. 229 234 Just produce your ganymed summary files with three off-regions. … … 238 243 Be carefull in case of three off-regions when switching on 239 244 scale mode. Make sure that the scale interval is set correctly. 245 246 - sponde: sponde.rc and sponde_onoff.rc are now idetical 247 248 - sponde: the resouce files have been rewritten with a lot of 249 comments and a well working parametrization for an energy estimator 240 250 241 251 - sponde: In the estimated energy versus monte carlo energy plot the -
trunk/MagicSoft/Mars/macros/train/traindisp.C
r8706 r8709 88 88 89 89 /* 90 -------------------- Magic-Cuts ----------------------90 // -------------------- Magic-Cuts ---------------------- 91 91 MFMagicCuts cuts; 92 92 cuts.SetHadronnessCut(MFMagicCuts::kArea); … … 111 111 opt.AddPreCut(&cuts); 112 112 113 -------------------- Energy Slope -------------------- 114 MFEnergySlope slope(-2.8); 115 opt.AddPreCut(&slope); 116 117 -------------------- Other cuts ---------------------- 113 // -------------------- Other cuts ---------------------- 118 114 opt.AddPreCut("MNewImagePar.fLeakage1<0.0001"); 119 115 opt.AddPreCut("MHillas.fSize>200"); … … 121 117 opt.AddPreCut("MPointingPos.fZd<25"); 122 118 123 ------------------ Zd distribution ------------------- 124 TFile file("ganymed00001111.root"); 125 126 MStatusArray arr; 127 if (arr.Read()<=0) 128 return; 129 TH1D *vstime = (TH1D*)arr.FindObjectInCanvas("Theta", "TH1D", "OnTime"); 130 if (!vstime) 131 return; 132 133 MMcSpectrumWeight weight; 134 weight.SetWeightsZd(vstime); 135 opt.AddPreTask(&weight); 136 137 ---------------------- Histogram -------------------- 138 119 // ---------------------- Histogram -------------------- 139 120 MHn hist("MyHist", "Energy Residual (lg E_{est} - lg E_{mc})"); 140 121 … … 157 138 opt.AddTestTask(&fill); 158 139 159 ------------------------------------------------------ 140 // -------------------- Energy Slope -------------------- 141 // Note, that weight normally doesn't improve anything here. 142 // This is a way to throw away events to a different slope 143 MFEnergySlope slope(-4.0); // New slope for mc spectrum 144 opt.AddPreCut(&slope); // throw away events to change slope 145 146 // This is a way to weight the events to a different spectrum 147 MMcSpectrumWeight weight; 148 weight.SetFormula("pow(X/300, -2.31-0.26*log10(X/300))"); 149 opt.SetWeights(&weight); 150 151 // ------------------ Zd distribution ------------------- 152 TFile file("ganymed00001111.root"); 153 154 MStatusArray arr; 155 if (arr.Read()<=0) 156 return; 157 TH1D *vstime = (TH1D*)arr.FindObjectInCanvas("Theta", "TH1D", "OnTime"); 158 if (!vstime) 159 return -1; 160 161 MMcSpectrumWeight weight; 162 weight.SetWeightsZd(vstime); 163 opt.AddPreTask(&weight); 164 165 // ------------------------------------------------------ 160 166 */ 161 167 -
trunk/MagicSoft/Mars/manalysis/MParameterCalc.cc
r8315 r8709 18 18 ! Author(s): Thomas Bretz 6/2005 <mailto:tbretz@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 520 ! Copyright: MAGIC Software Development, 2000-2007 21 21 ! 22 22 ! … … 36 36 // 37 37 // Output: 38 // MEnergyEst38 // fNameParameter [MParameterD] <default=MParameterD> 39 39 // 40 40 ///////////////////////////////////////////////////////////////////////////// … … 110 110 return kFALSE; 111 111 112 *fLog << inf << "Rule : " << fData->GetRule() << endl;112 *fLog << inf << "Rule for " << fNameParameter << ": " << fData->GetRule() << endl; 113 113 114 114 if (!fData->PreProcess(plist)) … … 142 142 } 143 143 144 // -------------------------------------------------------------------------- 145 // 146 // Print some execution statistics 147 // 144 148 Int_t MParameterCalc::PostProcess() 145 149 { … … 180 184 // test.rc: 181 185 // MyEstimator.Rule: {0} + {1} 186 // MyEstimator.NameOutput: MParameterD 182 187 // MyEstimator.0: log10(MHillas.fSize) 183 188 // MyEstimator.1: 5.5 … … 206 211 } 207 212 208 return kTRUE; 209 } 213 if (IsEnvDefined(env, prefix, "NameOutput", print)) 214 fNameParameter = GetEnvValue(env, prefix, "NameOutput", fNameParameter); 215 216 return kTRUE; 217 } -
trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc
r8680 r8709 604 604 void MStatusDisplay::SetProgressBarPosition(Float_t p, Bool_t upd) 605 605 { 606 if (!gClient || gROOT->IsBatch()) 607 return; 608 606 609 fBar->SetPosition(p); 607 610 if (upd) -
trunk/MagicSoft/Mars/mfbase/MFDataPhrase.cc
r8706 r8709 71 71 // gROOT->ProcessLineFast("line"); 72 72 // 73 // 74 // Class Version 2: 75 // ---------------- 76 // + Bool_t fDefault 77 // 73 78 ///////////////////////////////////////////////////////////////////////////// 74 79 #include "MFDataPhrase.h" … … 96 101 // Default Constructor. Don't use. 97 102 // 98 MFDataPhrase::MFDataPhrase() : fData(NULL), fAllowEmpty(kFALSE) 103 MFDataPhrase::MFDataPhrase() 104 : fData(NULL), fAllowEmpty(kFALSE), fDefault(kTRUE) 99 105 { 100 106 fName = gsDefName.Data(); … … 107 113 // the class description above. 108 114 // 109 MFDataPhrase::MFDataPhrase(const char *text, const char *name, const char *title) : fData(NULL), fAllowEmpty(kFALSE) 115 MFDataPhrase::MFDataPhrase(const char *text, const char *name, const char *title) 116 : fData(NULL), fAllowEmpty(kFALSE), fDefault(kTRUE) 110 117 { 111 118 fName = name ? name : gsDefName.Data(); -
trunk/MagicSoft/Mars/mfbase/MFDataPhrase.h
r8706 r8709 61 61 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print=kFALSE); 62 62 63 ClassDef(MFDataPhrase, 1) // A Filter for cuts in any data member63 ClassDef(MFDataPhrase, 2) // A Filter for cuts in any data member 64 64 }; 65 65 -
trunk/MagicSoft/Mars/mhbase/MH.cc
r8696 r8709 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MH.cc,v 1.3 5 2007-08-22 18:22:49tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MH.cc,v 1.36 2007-08-25 15:30:24 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 1398 1398 //const Double_t rc = ((1-2*w)*e1*e1+w*w*e2*e2)/(b2*b2); 1399 1399 1400 if (b2==0) 1401 { 1402 hres.SetBinError(binx, 0); 1403 continue; 1404 } 1405 1400 1406 const Double_t c = c2==0 ? 1 : c1/c2; 1401 1407 const Double_t u = b2==0 ? 0 : b1/b2; -
trunk/MagicSoft/Mars/mhbase/MH3.cc
r8698 r8709 574 574 } 575 575 576 void MH3::HandleLogAxis(TAxis &axe) const 577 { 578 if (axe.GetXmax()>3000*axe.GetXmin()) 579 return; 580 581 axe.SetMoreLogLabels(); 582 if (axe.GetXmax()<5000) 583 axe.SetNoExponent(); 584 } 585 576 586 // -------------------------------------------------------------------------- 577 587 // … … 582 592 // PROFY: Draw a y-profile into the histogram (for 2D histograms only) 583 593 // ONLY: Draw the profile histogram only (for 2D histograms only) 584 // BLUE: Draw the profile in blue color instead of the histograms line color 594 // BLUE: Draw the profile in blue color instead of the histograms 595 // line color 585 596 // 586 597 // If the kIsLog?-Bit is set the axis is displayed lkogarithmically. … … 597 608 pad->SetGridy(); 598 609 599 if (fHist->TestBit(kIsLogx)) pad->SetLogx(); 600 if (fHist->TestBit(kIsLogy)) pad->SetLogy(); 601 if (fHist->TestBit(kIsLogz)) pad->SetLogz(); 610 if (fHist->TestBit(kIsLogx)) 611 { 612 pad->SetLogx(); 613 HandleLogAxis(*fHist->GetXaxis()); 614 } 615 if (fHist->TestBit(kIsLogy)) 616 { 617 pad->SetLogy(); 618 HandleLogAxis(*fHist->GetYaxis()); 619 } 620 if (fHist->TestBit(kIsLogz)) 621 { 622 pad->SetLogz(); 623 HandleLogAxis(*fHist->GetZaxis()); 624 } 602 625 603 626 fHist->SetFillStyle(4000); -
trunk/MagicSoft/Mars/mhbase/MH3.h
r8698 r8709 27 27 Double_t fScale[3]; // Scale for the three axis (eg unit) 28 28 Byte_t fStyleBits; // Set the range of a histogram automatically in Finalize 29 30 void HandleLogAxis(TAxis &axe) const; 29 31 30 32 void StreamPrimitive(ostream &out) const; -
trunk/MagicSoft/Mars/mhbase/MHn.cc
r8698 r8709 410 410 411 411 case 2: // 2 412 pad->Divide(1,2 );412 pad->Divide(1,2, 1e-5, 1e-5); 413 413 break; 414 414 case 3: // 3 415 pad->Divide(2,2 );415 pad->Divide(2,2, 1e-5, 1e-5); 416 416 delete pad->GetPad(4); 417 417 break; 418 418 case 4: // 4 419 pad->Divide(2,2 );419 pad->Divide(2,2, 1e-5, 1e-5); 420 420 break; 421 421 case 5: // 5 422 pad->Divide(3,2 );422 pad->Divide(3,2, 1e-5, 1e-5); 423 423 delete pad->GetPad(6); 424 424 break; 425 425 case 6: // 6 426 pad->Divide(3,2 );426 pad->Divide(3,2, 1e-5, 1e-5); 427 427 break; 428 428 429 429 case 12: // 2 430 pad->Divide(2,1 );430 pad->Divide(2,1, 1e-5, 1e-5); 431 431 break; 432 432 case 13: // 3 433 433 break; 434 434 case 14: // 4 435 pad->Divide(2,2 );435 pad->Divide(2,2, 1e-5, 1e-5); 436 436 break; 437 437 case 15: // 5 438 pad->Divide(2,3 );438 pad->Divide(2,3, 1e-5, 1e-5); 439 439 pad->GetPad(4)->SetPad(0.51, 0.01, 0.99, 0.65); 440 440 delete pad->GetPad(6); -
trunk/MagicSoft/Mars/mhflux/MHCollectionArea.cc
r8695 r8709 99 99 100 100 MBinning binsa, binse, binst; 101 binse.SetEdgesLog( 15, 10, 1000000);101 binse.SetEdgesLog(21, 6.3, 100000); 102 102 binst.SetEdgesASin(67, -0.005, 0.665); 103 103 … … 136 136 MH::SetBinomialErrors(fHEnergy, *hsel, *hall); 137 137 #endif 138 138 139 fHEnergy.Scale(totalarea); 139 140 … … 198 199 } 199 200 200 // FIXME: Does this need some weighting with the number of produced events?201 201 if (runheader->GetImpactMax()>fMcAreaRadius*100) 202 202 { -
trunk/MagicSoft/Mars/mhflux/MHEnergyEst.cc
r8695 r8709 95 95 96 96 MBinning binsi, binse, binst, binsr; 97 binse.SetEdgesLog(2 5, 10, 1000000);97 binse.SetEdgesLog(21, 6.3, 100000); 98 98 binst.SetEdgesASin(51, -0.005, 0.505); 99 binsi.SetEdges(10, 0, 400);100 99 binsr.SetEdges(75, -1.75, 1.75); 100 101 // Use the binning in impact to do efficiency studies 102 binsi.SetEdges(1, 0, 1000); 101 103 102 104 SetBinning(&fHEnergy, &binse, &binse, &binst); … … 513 515 line.DrawLine(0,0,1,1); 514 516 517 line.SetLineColor(kBlue); 518 line.SetLineWidth(2); 519 line.SetLineStyle(kDashed); 520 515 521 pad2->cd(2); 516 522 h = MakePlot(fHResolution, "zy"); … … 521 527 h->SetMaximum(1.3); 522 528 529 line.DrawLine(h->GetXaxis()->GetXmin(), 0, h->GetXaxis()->GetXmax(), 0); 530 523 531 pad2->cd(3); 524 532 h = MakePlot(fHResolution, "zx"); … … 528 536 h->SetMinimum(-1.3); 529 537 h->SetMaximum(1.3); 538 539 line.DrawLine(h->GetXaxis()->GetXmin(), 0, h->GetXaxis()->GetXmax(), 0); 530 540 } 531 541 -
trunk/MagicSoft/Mars/mhflux/MMcSpectrumWeight.cc
r8695 r8709 493 493 if (hasold) 494 494 { 495 *fLog << " Old Spectrum: " << GetFormulaSpecOldX();495 *fLog << " Old Spectrum: " << GetFormulaSpecOldX(); 496 496 if (fEnergyMin>=0 && fEnergyMax>0) 497 497 *fLog << " (I=" << GetSpecOldIntegral() << ")"; … … 500 500 if (hasnew) 501 501 { 502 *fLog << " New Spectrum: " << GetFormulaSpecNewX();502 *fLog << " New Spectrum: " << GetFormulaSpecNewX(); 503 503 if (fEnergyMin>=0 && fEnergyMax>0) 504 504 *fLog << " (I=" << GetSpecNewIntegral() << ")"; -
trunk/MagicSoft/Mars/mjobs/MJCut.cc
r8706 r8709 697 697 SetupWriter(write1, "WriteAfterCut3"); 698 698 699 MTaskEnv taskenv 2("CalcHadronness");700 taskenv 2.SetDefault(fCalcHadronness);701 702 MTaskEnv taskenv 3("CalcDisp");703 taskenv 3.SetDefault(fCalcDisp);704 705 MTaskEnv taskenv 4("EstimateEnergy");706 taskenv 4.SetDefault(fEstimateEnergy);699 MTaskEnv taskenv0("CalcDisp"); 700 taskenv0.SetDefault(fCalcDisp); 701 702 MTaskEnv taskenv1("CalcHadronness"); 703 taskenv1.SetDefault(fCalcHadronness); 704 705 MTaskEnv taskenv2("EstimateEnergy"); 706 taskenv2.SetDefault(fEstimateEnergy); 707 707 708 708 MParameterCalc setevtnum("MRawEvtHeader.fDAQEvtNumber", "SetEvtNumber"); … … 788 788 if (set.IsWobbleMode()) 789 789 tlist2.AddToList(&hcalc2); 790 //tlist2.AddToList(&taskenv1);791 790 tlist2.AddToList(&cont0); 792 tlist2.AddToList(&taskenv 2);793 tlist2.AddToList(&taskenv 3);791 tlist2.AddToList(&taskenv0); 792 tlist2.AddToList(&taskenv1); 794 793 tlist2.AddToList(&setrunnum); 795 794 tlist2.AddToList(&setevtnum); … … 824 823 } 825 824 tlist2.AddToList(&cont3); 826 tlist2.AddToList(&taskenv 4);825 tlist2.AddToList(&taskenv2); 827 826 828 827 if (write1) … … 863 862 //if (taskenv1.GetTask()) 864 863 // cont.Add(taskenv1.GetTask()); 864 if (taskenv0.GetTask()) 865 cont.Add(taskenv0.GetTask()); 866 if (taskenv1.GetTask()) 867 cont.Add(taskenv1.GetTask()); 865 868 if (taskenv2.GetTask()) 866 869 cont.Add(taskenv2.GetTask()); 867 if (taskenv3.GetTask())868 cont.Add(taskenv3.GetTask());869 870 870 871 if (!WriteTasks(set.GetNumAnalysis(), cont)) -
trunk/MagicSoft/Mars/mjobs/MJSpectrum.cc
r8703 r8709 86 86 MJSpectrum::MJSpectrum(const char *name, const char *title) 87 87 : fCutQ(0), fCut0(0),fCut1(0), fCut2(0), fCut3(0), fCutS(0), 88 fEstimateEnergy(0), fCalcHadronness(0), f ForceTheta(kFALSE)88 fEstimateEnergy(0), fCalcHadronness(0), fCalcDisp(0), fForceTheta(kFALSE) 89 89 { 90 90 fName = name ? name : "MJSpectrum"; … … 118 118 if (fCalcHadronness) 119 119 delete fCalcHadronness; 120 if (fCalcDisp) 121 delete fCalcDisp; 120 122 } 121 123 … … 261 263 return -1; 262 264 if (!ReadTask(fCalcHadronness, "CalcHadronness", kFALSE)) 265 return -1; 266 if (!ReadTask(fCalcDisp, "CalcDisp", kFALSE)) 263 267 return -1; 264 268 … … 664 668 read.DisableAutoScheme(); 665 669 read.AddFile(fPathIn); 666 667 MTaskEnv taskenv0("CalcHadronness"); 668 taskenv0.SetDefault(fCalcHadronness); 669 670 /* 671 MTaskEnv taskenv0("CalcDisp"); 672 taskenv0.SetDefault(fCalcDisp); 673 674 MTaskEnv taskenv1("CalcHadronness"); 675 taskenv1.SetDefault(fCalcHadronness); 676 */ 670 677 MEnergyEstimate est; 671 MTaskEnv taskenv 1("EstimateEnergy");672 taskenv 1.SetDefault(fEstimateEnergy ? fEstimateEnergy : &est);678 MTaskEnv taskenv2("EstimateEnergy"); 679 taskenv2.SetDefault(fEstimateEnergy ? fEstimateEnergy : &est); 673 680 674 681 MContinue *cont = new MContinue("", "CutS"); … … 693 700 tlist.AddToList(&read); 694 701 //tlist.AddToList(&taskenv0); // not necessary, stored in file! 702 //tlist.AddToList(&taskenv1); // not necessary, stored in file! 695 703 tlist.AddToList(fCutS); 696 tlist.AddToList(&taskenv 1);704 tlist.AddToList(&taskenv2); 697 705 tlist.AddToList(&f0); 698 706 tlist.AddToList(&f1); … … 1560 1568 // energy limit! 1561 1569 1562 MTaskEnv taskenv0("CalcHadronness"); 1563 taskenv0.SetDefault(fCalcHadronness); 1570 MTaskEnv taskenv0("CalcDisp"); 1571 taskenv0.SetDefault(fCalcDisp); 1572 1573 MTaskEnv taskenv1("CalcHadronness"); 1574 taskenv1.SetDefault(fCalcHadronness); 1564 1575 1565 1576 MEnergyEstimate est; 1566 MTaskEnv taskenv 1("EstimateEnergy");1567 taskenv 1.SetDefault(fEstimateEnergy ? fEstimateEnergy : &est);1577 MTaskEnv taskenv2("EstimateEnergy"); 1578 taskenv2.SetDefault(fEstimateEnergy ? fEstimateEnergy : &est); 1568 1579 1569 1580 tlist2.AddToList(&read); … … 1582 1593 tlist2.AddToList(fCut0); 1583 1594 tlist2.AddToList(&taskenv0); 1595 tlist2.AddToList(&taskenv1); 1584 1596 tlist2.AddToList(fCut1); 1585 1597 tlist2.AddToList(fCutS); 1586 1598 tlist2.AddToList(fCut2); 1587 1599 tlist2.AddToList(fCut3); 1588 tlist2.AddToList(&taskenv 1);1600 tlist2.AddToList(&taskenv2); 1589 1601 tlist2.AddToList(&fill31); 1590 1602 tlist2.AddToList(&fill4); -
trunk/MagicSoft/Mars/mjobs/MJSpectrum.h
r8706 r8709 33 33 MTask *fEstimateEnergy; 34 34 MTask *fCalcHadronness; 35 MTask *fCalcDisp; 35 36 36 37 Bool_t fForceTheta; -
trunk/MagicSoft/Mars/msql/MSQLMagic.cc
r8589 r8709 69 69 const TString rc = row ? (*row)[0] : ""; 70 70 71 if (row) 72 delete row; 73 71 74 delete res; 72 75 return rc; … … 124 127 125 128 const Int_t rc1 = row && (*row)[0] ? atoi((*row)[0]) : -1; 129 130 if (row) 131 delete row; 132 126 133 delete res1; 134 127 135 return rc1; 128 136 } … … 191 199 if (row && (*row)[0]) 192 200 rc=kTRUE; 201 202 if (row) 203 delete row; 193 204 194 205 delete res; -
trunk/MagicSoft/Mars/msql/MSQLServer.cc
r8185 r8709 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MSQLServer.cc,v 1.1 3 2006-11-01 08:29:45tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MSQLServer.cc,v 1.14 2007-08-25 15:30:26 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 82 82 83 83 TSQLRow *row=res->Next(); 84 const TString desc((*row)[1]); 84 const TString desc(row ? (*row)[1] : ""); 85 86 if (row) 87 delete row; 85 88 86 89 delete res; … … 178 181 { 179 182 TString row0((*row)[0]); 183 delete row; 180 184 181 185 MSQLServer *sql = (MSQLServer*)fList.FindObject(Form("%s/%s/%s", (const char*)fDataBase, (const char*)fTable, (const char*)row0)); … … 202 206 { 203 207 TString row0((*row)[0]); 208 delete row; 204 209 205 210 MSQLServer *sql = (MSQLServer*)fList.FindObject(Form("%s/%s", (const char*)fDataBase, (const char*)row0)); … … 226 231 { 227 232 const TString row0((*row)[0]); 233 delete row; 228 234 229 235 MSQLServer *sql = (MSQLServer*)fList.FindObject(row0); … … 257 263 258 264 TList rows; 265 rows.SetOwner(); 266 259 267 while ((row=res.Next())) 260 268 { … … 305 313 306 314 TList rows; 315 rows.SetOwner(); 316 307 317 while ((row=res->Next())) 308 318 rows.Add(row); … … 767 777 while ((row=res->Next())) 768 778 { 769 TString key = (*row)[3]; 770 if (key!="PRI") 771 continue; 772 773 rc = (*row)[0]; 774 break; 779 const TString key = (*row)[3]; 780 if (key=="PRI") 781 { 782 rc = (*row)[0]; 783 break; 784 } 785 delete row; 775 786 } 776 787 -
trunk/MagicSoft/Mars/sponde.cc
r8683 r8709 221 221 job.ForceTheta(kForceTheta); 222 222 223 if (!job.HasWritePermission(kOutfile)) 224 return 2; 225 223 226 if (!job.Process(seq)) 224 227 { -
trunk/MagicSoft/Mars/sponde.rc
r8705 r8709 26 26 27 27 # --------------- Setup the weighting for your spectrum --------------- 28 # For more details MMcSpectrumWeight::ReadEnv28 # For more details see McSpectrumWeight::ReadEnv 29 29 30 30 # A simple power law with a differential spectral index of -4 -
trunk/MagicSoft/Mars/sponde_onoff.rc
r8705 r8709 26 26 27 27 # --------------- Setup the weighting for your spectrum --------------- 28 # For more detailsMMcSpectrumWeight::ReadEnv28 # For more details see MMcSpectrumWeight::ReadEnv 29 29 30 30 # A simple power law with a differential spectral index of -4
Note:
See TracChangeset
for help on using the changeset viewer.