Changeset 8709


Ignore:
Timestamp:
08/25/07 16:30:26 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r8704 r8709  
    2020
    2121
     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
    2279 2007/08/24 Thomas Bretz
    2380
     
    59116     - it turned out that we use 1/2 and not 0/1 as expected
    60117
    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
    62154
    63155
     
    182274   * datacenter/scripts/runcallisto
    183275     - modified staging of files
    184    
     276
    185277   * datacenter/scripts/runstar
    186278     - corrected server and added logfile entry for staging of files
  • trunk/MagicSoft/Mars/NEWS

    r8704 r8709  
    226226     positions have disappeared.
    227227
     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
    228233   - optim, sponde: should now properly support three off-regions.
    229234     Just produce your ganymed summary files with three off-regions.
     
    238243     Be carefull in case of three off-regions when switching on
    239244     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
    240250
    241251   - sponde: In the estimated energy versus monte carlo energy plot the
  • trunk/MagicSoft/Mars/macros/train/traindisp.C

    r8706 r8709  
    8888
    8989    /*
    90      -------------------- Magic-Cuts ----------------------
     90     // -------------------- Magic-Cuts ----------------------
    9191     MFMagicCuts cuts;
    9292     cuts.SetHadronnessCut(MFMagicCuts::kArea);
     
    111111     opt.AddPreCut(&cuts);
    112112
    113      -------------------- Energy Slope --------------------
    114      MFEnergySlope slope(-2.8);
    115      opt.AddPreCut(&slope);
    116 
    117      -------------------- Other cuts ----------------------
     113     // -------------------- Other cuts ----------------------
    118114     opt.AddPreCut("MNewImagePar.fLeakage1<0.0001");
    119115     opt.AddPreCut("MHillas.fSize>200");
     
    121117     opt.AddPreCut("MPointingPos.fZd<25");
    122118
    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  --------------------
    139120     MHn hist("MyHist", "Energy Residual (lg E_{est} - lg E_{mc})");
    140121
     
    157138     opt.AddTestTask(&fill);
    158139
    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     // ------------------------------------------------------
    160166    */
    161167
  • trunk/MagicSoft/Mars/manalysis/MParameterCalc.cc

    r8315 r8709  
    1818!   Author(s): Thomas Bretz  6/2005 <mailto:tbretz@astro.uni-wuerzburg.de>
    1919!
    20 !   Copyright: MAGIC Software Development, 2000-2005
     20!   Copyright: MAGIC Software Development, 2000-2007
    2121!
    2222!
     
    3636//
    3737// Output:
    38 //   MEnergyEst
     38//   fNameParameter [MParameterD] <default=MParameterD>
    3939//
    4040/////////////////////////////////////////////////////////////////////////////
     
    110110        return kFALSE;
    111111
    112     *fLog << inf << "Rule: " << fData->GetRule() << endl;
     112    *fLog << inf << "Rule for " << fNameParameter << ": " << fData->GetRule() << endl;
    113113
    114114    if (!fData->PreProcess(plist))
     
    142142}
    143143
     144// --------------------------------------------------------------------------
     145//
     146// Print some execution statistics
     147//
    144148Int_t MParameterCalc::PostProcess()
    145149{
     
    180184//   test.rc:
    181185//     MyEstimator.Rule: {0} + {1}
     186//     MyEstimator.NameOutput: MParameterD
    182187//     MyEstimator.0: log10(MHillas.fSize)
    183188//     MyEstimator.1: 5.5
     
    206211    }
    207212
    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  
    604604void MStatusDisplay::SetProgressBarPosition(Float_t p, Bool_t upd)
    605605{
     606    if (!gClient || gROOT->IsBatch())
     607        return;
     608
    606609    fBar->SetPosition(p);
    607610    if (upd)
  • trunk/MagicSoft/Mars/mfbase/MFDataPhrase.cc

    r8706 r8709  
    7171//        gROOT->ProcessLineFast("line");
    7272//
     73//
     74// Class Version 2:
     75// ----------------
     76//  + Bool_t fDefault
     77//
    7378/////////////////////////////////////////////////////////////////////////////
    7479#include "MFDataPhrase.h"
     
    96101// Default Constructor. Don't use.
    97102//
    98 MFDataPhrase::MFDataPhrase() : fData(NULL), fAllowEmpty(kFALSE)
     103MFDataPhrase::MFDataPhrase()
     104    : fData(NULL), fAllowEmpty(kFALSE), fDefault(kTRUE)
    99105{
    100106    fName  = gsDefName.Data();
     
    107113// the class description above.
    108114//
    109 MFDataPhrase::MFDataPhrase(const char *text, const char *name, const char *title) : fData(NULL), fAllowEmpty(kFALSE)
     115MFDataPhrase::MFDataPhrase(const char *text, const char *name, const char *title)
     116    : fData(NULL), fAllowEmpty(kFALSE), fDefault(kTRUE)
    110117{
    111118    fName  = name  ? name  : gsDefName.Data();
  • trunk/MagicSoft/Mars/mfbase/MFDataPhrase.h

    r8706 r8709  
    6161    Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print=kFALSE);
    6262
    63     ClassDef(MFDataPhrase, 1) // A Filter for cuts in any data member
     63    ClassDef(MFDataPhrase, 2) // A Filter for cuts in any data member
    6464};
    6565
  • trunk/MagicSoft/Mars/mhbase/MH.cc

    r8696 r8709  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MH.cc,v 1.35 2007-08-22 18:22:49 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MH.cc,v 1.36 2007-08-25 15:30:24 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    13981398        //const Double_t rc = ((1-2*w)*e1*e1+w*w*e2*e2)/(b2*b2);
    13991399
     1400        if (b2==0)
     1401        {
     1402            hres.SetBinError(binx, 0);
     1403            continue;
     1404        }
     1405
    14001406        const Double_t c = c2==0 ? 1 : c1/c2;
    14011407        const Double_t u = b2==0 ? 0 : b1/b2;
  • trunk/MagicSoft/Mars/mhbase/MH3.cc

    r8698 r8709  
    574574}
    575575
     576void 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
    576586// --------------------------------------------------------------------------
    577587//
     
    582592//   PROFY: Draw a y-profile into the histogram (for 2D histograms only)
    583593//   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
    585596//
    586597// If the kIsLog?-Bit is set the axis is displayed lkogarithmically.
     
    597608    pad->SetGridy();
    598609
    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    }
    602625
    603626    fHist->SetFillStyle(4000);
  • trunk/MagicSoft/Mars/mhbase/MH3.h

    r8698 r8709  
    2727    Double_t    fScale[3];       // Scale for the three axis (eg unit)
    2828    Byte_t      fStyleBits;      // Set the range of a histogram automatically in Finalize
     29
     30    void HandleLogAxis(TAxis &axe) const;
    2931
    3032    void StreamPrimitive(ostream &out) const;
  • trunk/MagicSoft/Mars/mhbase/MHn.cc

    r8698 r8709  
    410410
    411411        case 2:   // 2
    412             pad->Divide(1,2);
     412            pad->Divide(1,2, 1e-5, 1e-5);
    413413            break;
    414414        case 3:   // 3
    415             pad->Divide(2,2);
     415            pad->Divide(2,2, 1e-5, 1e-5);
    416416            delete pad->GetPad(4);
    417417            break;
    418418         case 4:   // 4
    419             pad->Divide(2,2);
     419            pad->Divide(2,2, 1e-5, 1e-5);
    420420            break;
    421421        case 5:   // 5
    422             pad->Divide(3,2);
     422            pad->Divide(3,2, 1e-5, 1e-5);
    423423            delete pad->GetPad(6);
    424424            break;
    425425        case 6:   // 6
    426             pad->Divide(3,2);
     426            pad->Divide(3,2, 1e-5, 1e-5);
    427427            break;
    428428
    429429        case 12:  // 2
    430             pad->Divide(2,1);
     430            pad->Divide(2,1, 1e-5, 1e-5);
    431431            break;
    432432        case 13:  // 3
    433433            break;
    434434        case 14:  // 4
    435             pad->Divide(2,2);
     435            pad->Divide(2,2, 1e-5, 1e-5);
    436436            break;
    437437        case 15:  // 5
    438             pad->Divide(2,3);
     438            pad->Divide(2,3, 1e-5, 1e-5);
    439439            pad->GetPad(4)->SetPad(0.51, 0.01, 0.99, 0.65);
    440440            delete pad->GetPad(6);
  • trunk/MagicSoft/Mars/mhflux/MHCollectionArea.cc

    r8695 r8709  
    9999
    100100    MBinning binsa, binse, binst;
    101     binse.SetEdgesLog(15, 10, 1000000);
     101    binse.SetEdgesLog(21, 6.3, 100000);
    102102    binst.SetEdgesASin(67, -0.005, 0.665);
    103103
     
    136136    MH::SetBinomialErrors(fHEnergy, *hsel, *hall);
    137137#endif
     138
    138139    fHEnergy.Scale(totalarea);
    139140
     
    198199    }
    199200
    200     // FIXME: Does this need some weighting with the number of produced events?
    201201    if (runheader->GetImpactMax()>fMcAreaRadius*100)
    202202    {
  • trunk/MagicSoft/Mars/mhflux/MHEnergyEst.cc

    r8695 r8709  
    9595
    9696    MBinning binsi, binse, binst, binsr;
    97     binse.SetEdgesLog(25, 10, 1000000);
     97    binse.SetEdgesLog(21, 6.3, 100000);
    9898    binst.SetEdgesASin(51, -0.005, 0.505);
    99     binsi.SetEdges(10, 0, 400);
    10099    binsr.SetEdges(75, -1.75, 1.75);
     100
     101    // Use the binning in impact to do efficiency studies
     102    binsi.SetEdges(1, 0, 1000);
    101103
    102104    SetBinning(&fHEnergy,     &binse, &binse, &binst);
     
    513515    line.DrawLine(0,0,1,1);
    514516
     517    line.SetLineColor(kBlue);
     518    line.SetLineWidth(2);
     519    line.SetLineStyle(kDashed);
     520
    515521    pad2->cd(2);
    516522    h = MakePlot(fHResolution, "zy");
     
    521527    h->SetMaximum(1.3);
    522528
     529    line.DrawLine(h->GetXaxis()->GetXmin(), 0, h->GetXaxis()->GetXmax(), 0);
     530
    523531    pad2->cd(3);
    524532    h = MakePlot(fHResolution, "zx");
     
    528536    h->SetMinimum(-1.3);
    529537    h->SetMaximum(1.3);
     538
     539    line.DrawLine(h->GetXaxis()->GetXmin(), 0, h->GetXaxis()->GetXmax(), 0);
    530540}
    531541
  • trunk/MagicSoft/Mars/mhflux/MMcSpectrumWeight.cc

    r8695 r8709  
    493493    if (hasold)
    494494    {
    495         *fLog << " Old Spectrum: " << GetFormulaSpecOldX();
     495        *fLog << " Old Spectrum:  " << GetFormulaSpecOldX();
    496496        if (fEnergyMin>=0 && fEnergyMax>0)
    497497            *fLog << "   (I=" << GetSpecOldIntegral() << ")";
     
    500500    if (hasnew)
    501501    {
    502         *fLog << " New Spectrum: " << GetFormulaSpecNewX();
     502        *fLog << " New Spectrum:  " << GetFormulaSpecNewX();
    503503        if (fEnergyMin>=0 && fEnergyMax>0)
    504504            *fLog << "   (I=" << GetSpecNewIntegral() << ")";
  • trunk/MagicSoft/Mars/mjobs/MJCut.cc

    r8706 r8709  
    697697    SetupWriter(write1, "WriteAfterCut3");
    698698
    699     MTaskEnv taskenv2("CalcHadronness");
    700     taskenv2.SetDefault(fCalcHadronness);
    701 
    702     MTaskEnv taskenv3("CalcDisp");
    703     taskenv3.SetDefault(fCalcDisp);
    704 
    705     MTaskEnv taskenv4("EstimateEnergy");
    706     taskenv4.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);
    707707
    708708    MParameterCalc setevtnum("MRawEvtHeader.fDAQEvtNumber", "SetEvtNumber");
     
    788788    if (set.IsWobbleMode())
    789789        tlist2.AddToList(&hcalc2);
    790     //tlist2.AddToList(&taskenv1);
    791790    tlist2.AddToList(&cont0); 
    792     tlist2.AddToList(&taskenv2);
    793     tlist2.AddToList(&taskenv3);
     791    tlist2.AddToList(&taskenv0);
     792    tlist2.AddToList(&taskenv1);
    794793    tlist2.AddToList(&setrunnum);
    795794    tlist2.AddToList(&setevtnum);
     
    824823    }
    825824    tlist2.AddToList(&cont3);
    826     tlist2.AddToList(&taskenv4);
     825    tlist2.AddToList(&taskenv2);
    827826
    828827    if (write1)
     
    863862    //if (taskenv1.GetTask())
    864863    //    cont.Add(taskenv1.GetTask());
     864    if (taskenv0.GetTask())
     865        cont.Add(taskenv0.GetTask());
     866    if (taskenv1.GetTask())
     867        cont.Add(taskenv1.GetTask());
    865868    if (taskenv2.GetTask())
    866869        cont.Add(taskenv2.GetTask());
    867     if (taskenv3.GetTask())
    868         cont.Add(taskenv3.GetTask());
    869870
    870871    if (!WriteTasks(set.GetNumAnalysis(), cont))
  • trunk/MagicSoft/Mars/mjobs/MJSpectrum.cc

    r8703 r8709  
    8686MJSpectrum::MJSpectrum(const char *name, const char *title)
    8787    : fCutQ(0), fCut0(0),fCut1(0), fCut2(0), fCut3(0), fCutS(0),
    88     fEstimateEnergy(0), fCalcHadronness(0),  fForceTheta(kFALSE)
     88    fEstimateEnergy(0), fCalcHadronness(0),  fCalcDisp(0), fForceTheta(kFALSE)
    8989{
    9090    fName  = name  ? name  : "MJSpectrum";
     
    118118    if (fCalcHadronness)
    119119        delete fCalcHadronness;
     120    if (fCalcDisp)
     121        delete fCalcDisp;
    120122}
    121123
     
    261263        return -1;
    262264    if (!ReadTask(fCalcHadronness, "CalcHadronness", kFALSE))
     265        return -1;
     266    if (!ReadTask(fCalcDisp,       "CalcDisp",       kFALSE))
    263267        return -1;
    264268
     
    664668    read.DisableAutoScheme();
    665669    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 */
    670677    MEnergyEstimate est;
    671     MTaskEnv taskenv1("EstimateEnergy");
    672     taskenv1.SetDefault(fEstimateEnergy ? fEstimateEnergy : &est);
     678    MTaskEnv taskenv2("EstimateEnergy");
     679    taskenv2.SetDefault(fEstimateEnergy ? fEstimateEnergy : &est);
    673680
    674681    MContinue *cont = new MContinue("", "CutS");
     
    693700    tlist.AddToList(&read);
    694701    //tlist.AddToList(&taskenv0); // not necessary, stored in file!
     702    //tlist.AddToList(&taskenv1); // not necessary, stored in file!
    695703    tlist.AddToList(fCutS);
    696     tlist.AddToList(&taskenv1);
     704    tlist.AddToList(&taskenv2);
    697705    tlist.AddToList(&f0);
    698706    tlist.AddToList(&f1);
     
    15601568    // energy limit!
    15611569
    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);
    15641575
    15651576    MEnergyEstimate est;
    1566     MTaskEnv taskenv1("EstimateEnergy");
    1567     taskenv1.SetDefault(fEstimateEnergy ? fEstimateEnergy : &est);
     1577    MTaskEnv taskenv2("EstimateEnergy");
     1578    taskenv2.SetDefault(fEstimateEnergy ? fEstimateEnergy : &est);
    15681579
    15691580    tlist2.AddToList(&read);
     
    15821593    tlist2.AddToList(fCut0);
    15831594    tlist2.AddToList(&taskenv0);
     1595    tlist2.AddToList(&taskenv1);
    15841596    tlist2.AddToList(fCut1);
    15851597    tlist2.AddToList(fCutS);
    15861598    tlist2.AddToList(fCut2);
    15871599    tlist2.AddToList(fCut3);
    1588     tlist2.AddToList(&taskenv1);
     1600    tlist2.AddToList(&taskenv2);
    15891601    tlist2.AddToList(&fill31);
    15901602    tlist2.AddToList(&fill4);
  • trunk/MagicSoft/Mars/mjobs/MJSpectrum.h

    r8706 r8709  
    3333    MTask *fEstimateEnergy;
    3434    MTask *fCalcHadronness;
     35    MTask *fCalcDisp;
    3536
    3637    Bool_t fForceTheta;
  • trunk/MagicSoft/Mars/msql/MSQLMagic.cc

    r8589 r8709  
    6969    const TString rc = row ? (*row)[0] : "";
    7070
     71    if (row)
     72        delete row;
     73
    7174    delete res;
    7275    return rc;
     
    124127
    125128    const Int_t rc1 = row && (*row)[0] ? atoi((*row)[0]) : -1;
     129
     130    if (row)
     131        delete row;
     132
    126133    delete res1;
     134
    127135    return rc1;
    128136}
     
    191199    if (row && (*row)[0])
    192200        rc=kTRUE;
     201
     202    if (row)
     203        delete row;
    193204
    194205    delete res;
  • trunk/MagicSoft/Mars/msql/MSQLServer.cc

    r8185 r8709  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MSQLServer.cc,v 1.13 2006-11-01 08:29:45 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MSQLServer.cc,v 1.14 2007-08-25 15:30:26 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    8282
    8383    TSQLRow *row=res->Next();
    84     const TString desc((*row)[1]);
     84    const TString desc(row ? (*row)[1] : "");
     85
     86    if (row)
     87        delete row;
    8588
    8689    delete res;
     
    178181    {
    179182        TString row0((*row)[0]);
     183        delete row;
    180184
    181185        MSQLServer *sql = (MSQLServer*)fList.FindObject(Form("%s/%s/%s", (const char*)fDataBase, (const char*)fTable, (const char*)row0));
     
    202206    {
    203207        TString row0((*row)[0]);
     208        delete row;
    204209
    205210        MSQLServer *sql = (MSQLServer*)fList.FindObject(Form("%s/%s", (const char*)fDataBase, (const char*)row0));
     
    226231    {
    227232        const TString row0((*row)[0]);
     233        delete row;
    228234
    229235        MSQLServer *sql = (MSQLServer*)fList.FindObject(row0);
     
    257263
    258264    TList rows;
     265    rows.SetOwner();
     266
    259267    while ((row=res.Next()))
    260268    {
     
    305313
    306314    TList rows;
     315    rows.SetOwner();
     316
    307317    while ((row=res->Next()))
    308318        rows.Add(row);
     
    767777    while ((row=res->Next()))
    768778    {
    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;
    775786    }
    776787
  • trunk/MagicSoft/Mars/sponde.cc

    r8683 r8709  
    221221    job.ForceTheta(kForceTheta);
    222222
     223    if (!job.HasWritePermission(kOutfile))
     224        return 2;
     225
    223226    if (!job.Process(seq))
    224227    {
  • trunk/MagicSoft/Mars/sponde.rc

    r8705 r8709  
    2626
    2727# --------------- Setup the weighting for your spectrum ---------------
    28 #     For more details MMcSpectrumWeight::ReadEnv
     28#            For more details see McSpectrumWeight::ReadEnv
    2929
    3030# A simple power law with a differential spectral index of -4
  • trunk/MagicSoft/Mars/sponde_onoff.rc

    r8705 r8709  
    2626
    2727# --------------- Setup the weighting for your spectrum ---------------
    28 #     For more details MMcSpectrumWeight::ReadEnv
     28#            For more details see MMcSpectrumWeight::ReadEnv
    2929
    3030# A simple power law with a differential spectral index of -4
Note: See TracChangeset for help on using the changeset viewer.