Changeset 6948


Ignore:
Timestamp:
04/18/05 10:17:03 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r6941 r6948  
    2121
    2222                                                 -*-*- END OF LINE -*-*-
     23
     24 2005/04/18 Thomas Bretz
     25
     26   * manalysis/MCompProbCalc.cc, mbadpixels/MBadPixelsCalc.cc,
     27     mbadpixels/MBadPixelsTreat.cc:
     28     - some fixes to documentation (THtml complained about missing
     29       classes)
     30
     31   * mbase/MStatusArray.[h,cc]:
     32     - implemented some functions to print contents of StatusArray
     33       and/or tab/canvas.
     34
     35   * mhbase/MFillH.cc:
     36     - remove fH from ListOfPrimitives before adding Clone in
     37       PostProcess
     38
     39   * mhbase/MH.[h,cc]:
     40     - implemented new member function RemoveFromPad (necessary
     41       if a class should support same-option)
     42
     43   * mimage/MHHillas.cc, mimage/MHHillasExt.cc, mimage/MHHillasSrc.cc,
     44     mimage/MHImagePar.cc, mimage/MHNewImagePar.cc, mimage/MHVsSize.cc:
     45     - fixed naming in case of same-option in Draw
     46     - remove previous histograms from pad in case of same-option
     47
     48   * mjobs/MJCut.[h,cc]:
     49     - write all binnings in WriteResult
     50     - write MHillasExt to output
     51     - BinningWidth, BinningLength and BinningDist added
     52
     53   * mjobs/MJOptimize.[h,cc]:
     54     - fixed a typo in output
     55     - allow to exchange Test-/Train-Sample
     56
     57
    2358
    2459 2005/04/14 Thomas Bretz
  • trunk/MagicSoft/Mars/NEWS

    r6945 r6948  
    5555
    5656   - fixed some slowdown in calibrating data with interleaved events from
    57      Jan and Dec.
     57     Jan and Dec. As a workaround made the pretty palette the default.
     58     The inverse Deep Blue Sea has a bug which slows down long calibration
     59     runs a lot.
    5860
    5961   - implemented new values from new starguider report as defined
     
    6466     you'll get the correct units (arcmin) but a different result
    6567     than with old versions (wrong units))
    66 
    67    - As a workaround made the pretty palette the default. The inverse
    68      Deep Blue Sea has a bug which slows down long calibration runs a lot.
    6968
    7069   - Now the status display can also write PNG, JPEG and XPM (other file
  • trunk/MagicSoft/Mars/manalysis/MCompProbCalc.cc

    r6892 r6948  
    7979//  - MHCompProb
    8080//  - all data values which were used to build the MHCompProb
    81 //  - MHadronness
    8281//
    8382Int_t MCompProbCalc::PreProcess(MParList *plist)
     
    138137//  - For all data members multiply the probabilities.
    139138//  - For normalization take the n-th root of the result.
    140 //  - This is the hadroness stored in the MHadronness container
     139//  - This is the hadroness stored in the Hadronness container
    141140//
    142141Int_t MCompProbCalc::Process()
  • trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCalc.cc

    r6905 r6948  
    6868#include "MGeomPix.h"
    6969
    70 //#include "MSigmabar.h"
    71 
    7270#include "MPedPhotCam.h"
    7371#include "MPedPhotPix.h"
  • trunk/MagicSoft/Mars/mbadpixels/MBadPixelsTreat.cc

    r6858 r6948  
    8888#include "MBadPixelsCam.h"
    8989
    90 //#include "MArrivalTime.h"
    91 
    9290ClassImp(MBadPixelsTreat);
    9391
  • trunk/MagicSoft/Mars/mbase/MStatusArray.cc

    r6932 r6948  
    198198    return FindObjectInCanvas(object, object, 0);
    199199}
     200
     201// --------------------------------------------------------------------------
     202//
     203// Print recursively all objects in this and sub-pads
     204//
     205void MStatusArray::PrintObjectsInPad(const TCollection *list, const TString &name, Int_t lvl) const
     206{
     207    TIter Next(list);
     208    TObject *o=0;
     209    while ((o=Next()))
     210    {
     211        const Bool_t print = name.IsNull() || name==(TString)o->GetName();
     212        if (print)
     213        {
     214            if (lvl>0)
     215                gLog << setw(lvl) << ' ';
     216            gLog << o->ClassName() << ": " << o->GetName() << " <" << Next.GetOption() << "> (" << o << ")" << endl;
     217        }
     218
     219        if (o->InheritsFrom(TVirtualPad::Class()))
     220            PrintObjectsInPad(((TVirtualPad*)o)->GetListOfPrimitives(), print?"":name, lvl+1);
     221    }
     222}
     223
     224// --------------------------------------------------------------------------
     225//
     226// Print recursively all objects in this and sub-pads. If !option.IsNull()
     227// only objects in the corresponding pad are printed.
     228//
     229void MStatusArray::Print(Option_t *option) const
     230{
     231    const TString opt(option);
     232
     233    PrintObjectsInPad(this, opt);
     234}
  • trunk/MagicSoft/Mars/mbase/MStatusArray.h

    r6932 r6948  
    1515{
    1616private:
     17    void     PrintObjectsInPad(const TCollection *list, const TString &name, Int_t lvl=0) const;
    1718    TObject *FindObjectInPad(TVirtualPad *pad, const char *object, TClass *base) const;
    1819    TClass  *GetClass(const char *name) const;
     
    2829    TObject *FindObjectInCanvas(const char *object, const char *canvas) const;
    2930
     31    void Print(Option_t *o="") const;
     32
    3033    TObject *FindObject(const char *object, const char *base) const;
    3134    TObject *FindObject(const char *object) const;
  • trunk/MagicSoft/Mars/mhbase/MH.cc

    r6890 r6948  
    191191// --------------------------------------------------------------------------
    192192//
     193// Search in gPad for all objects with the name name and remove all of them
     194// (TList::Remove)
     195//
     196void MH::RemoveFromPad(const char *name)
     197{
     198    if (!gPad)
     199        return;
     200
     201    TList *list = gPad->GetListOfPrimitives();
     202    if (!list)
     203        return;
     204
     205    TObject *obj = 0;
     206    while ((obj = gPad->FindObject(name)))
     207        list->Remove(obj);
     208}
     209
     210// --------------------------------------------------------------------------
     211//
    193212// Applies a given binning to a 1D-histogram
    194213//
     
    572591// Tries to find a MBinning container with the name "Binning"+name
    573592// in the given parameter list. If it was found it is applied to the
    574 // given histogram. This is only valid for 1D-histograms
     593// given histogram. This is only valid for 1D-histograms.
     594// If the binning is found, but it IsDefault() kTRUE is returned, but
     595// no binning is applied.
    575596//
    576597Bool_t MH::ApplyBinning(const MParList &plist, TString name, TH1 *h)
     
    588609        return kFALSE;
    589610    }
     611
     612    if (bins->IsDefault())
     613        return kTRUE;
    590614
    591615    SetBinning(h, bins);
  • trunk/MagicSoft/Mars/mhbase/MH.h

    r5994 r6948  
    5757                                  UInt_t w=625, UInt_t h=440,
    5858                                  Bool_t usescreenfactor=kFALSE);
     59
     60    static void RemoveFromPad(const char *name);
    5961
    6062    // FIXME: * --> & !!!
  • trunk/MagicSoft/Mars/mimage/MHHillas.cc

    r6890 r6948  
    303303    else
    304304    {
     305        fLength->SetName("LengthSame");
     306        fWidth->SetName("WidthSame");
     307        fDistC->SetName("DistCSame");
     308        fDelta->SetName("DeltaSame");
     309        fSize->SetName("SizeSame");
     310        fCenter->SetName("CenterSame");
     311
    305312        fDistC->SetLineColor(kGreen);
    306313        fSize->SetLineColor(kGreen);
    307314        fDelta->SetLineColor(kGreen);
    308 
    309315        fWidth->SetLineColor(kMagenta);
    310316        fLength->SetLineColor(kCyan);
     
    313319    pad->cd(1);
    314320    gPad->SetBorderMode(0);
     321    RemoveFromPad("WidthSame");
     322    RemoveFromPad("LengthSame");
    315323    MH::DrawSame(*fWidth, *fLength, "Width'n'Length", same);
    316324
    317325    pad->cd(2);
    318326    gPad->SetBorderMode(0);
     327    RemoveFromPad("DistCSame");
    319328    fDistC->Draw(same?"same":"");
    320329
     
    323332    gPad->SetLogx();
    324333    gPad->SetLogy();
     334    RemoveFromPad("SizeSame");
    325335    fSize->Draw(same?"same":"");
    326336
     
    339349                h->SetMarkerColor(kBlack);
    340350            }*/
     351            RemoveFromPad("CenterSame");
    341352            fCenter->SetMarkerColor(kGreen);
    342353            fCenter->Draw("same");
     
    357368    pad->cd(5);
    358369    gPad->SetBorderMode(0);
     370    RemoveFromPad("DeltaSame");
    359371    fDelta->Draw(same?"same":"");
    360372
     
    363375        delete gPad;
    364376
    365     pad->Modified();
    366     pad->Update();
     377    //pad->Modified();
     378    //pad->Update();
    367379}
    368380
  • trunk/MagicSoft/Mars/mimage/MHHillasExt.cc

    r6907 r6948  
    8383
    8484    fHAsym.SetName("Asymmetry");
    85     fHM3Long.SetName("3rd Mom Long");
    86     fHM3Trans.SetName("3rd Mom Trans");
    87     fHMaxDist.SetName("Max Dist");
     85    fHM3Long.SetName("M3l");
     86    fHM3Trans.SetName("M3t");
     87    fHMaxDist.SetName("MaxDist");
    8888
    8989    fHAsym.SetTitle("Asymmetry");
     
    259259    else
    260260    {
     261        fHAsym.SetName("AsymmetrySame");
     262        fHM3Long.SetName("M3lSame");
     263        fHM3Trans.SetName("M3tSame");
     264        fHMaxDist.SetName("MaxDistSame");
    261265        fHM3Long.SetLineColor(kMagenta);
    262266        fHM3Trans.SetLineColor(kCyan);
    263 
    264267        fHAsym.SetLineColor(kBlue);
    265268        fHMaxDist.SetLineColor(kBlue);
     
    268271    pad->cd(1);
    269272    gPad->SetBorderMode(0);
     273    RemoveFromPad("M3lSame");
     274    RemoveFromPad("M3tSame");
    270275    MH::DrawSame(fHM3Long, fHM3Trans, "3^{rd} Moments", same);
    271276
    272277    pad->cd(3);
    273278    gPad->SetBorderMode(0);
     279    RemoveFromPad("AsymmetrySame");
    274280    fHAsym.Draw(same?"same":"");
    275281
    276282    pad->cd(2);
    277283    gPad->SetBorderMode(0);
     284    RemoveFromPad("MaxDistSame");
    278285    fHMaxDist.Draw(same?"same":"");
    279286
  • trunk/MagicSoft/Mars/mimage/MHHillasSrc.cc

    r6907 r6948  
    156156    fCosDA->Fill(h.GetCosDeltaAlpha(), w);
    157157    fDCA  ->Fill(fUseMmScale ? h.GetDCA() : fMm2Deg*h.GetDCA(), w);
    158     fDCADelta ->Fill(h.GetDCADelta(), w);
     158    fDCADelta->Fill(h.GetDCADelta(), w);
    159159
    160160    return kTRUE;
     
    231231    else
    232232    {
     233        fAlpha->SetName("AlphaSame");
     234        fDist ->SetName("DistSame");
     235        fCosDA->SetName("CosDASame");
     236        fDCA  ->SetName("DCASame");
     237        fDCADelta->SetName("DCADeltaSame");
    233238        fAlpha->SetLineColor(kGreen);
    234239        fDist->SetLineColor(kGreen);
     
    240245    pad->cd(1);
    241246    gPad->SetBorderMode(0);
     247    RemoveFromPad("AlphaSame");
    242248    fAlpha->Draw(same?"same":"");
    243249
    244250    pad->cd(2);
    245251    gPad->SetBorderMode(0);
     252    RemoveFromPad("DistSame");
    246253    fDist->Draw(same?"same":"");
    247254
    248255    pad->cd(3);
    249256    gPad->SetBorderMode(0);
     257    RemoveFromPad("DCASame");
    250258    fDCA->Draw(same?"same":"");
    251259
     
    258266    p->cd(1);
    259267    gPad->SetBorderMode(0);
     268    RemoveFromPad("CosDASame");
    260269    fCosDA->Draw(same?"same":"");
    261270
    262271    p->cd(2);
    263272    gPad->SetBorderMode(0);
     273    RemoveFromPad("DCADeltaSame");
    264274    fDCADelta->Draw(same?"same":"");
    265275}
  • trunk/MagicSoft/Mars/mimage/MHImagePar.cc

    r6907 r6948  
    232232    else
    233233    {
     234        fHistSatHi.SetName("SatHiSame");
     235        fHistSatLo.SetName("SatLoSame");
     236        fHistIslands.SetName("IslandsSame");
     237        fHistSizeSubIslands.SetName("SizeSubSame");
     238        fHistSizeMainIsland.SetName("SizeMainSame");
     239        fHistNumSP.SetName("NumSPSame");
     240        fHistSizeSP.SetName("SizeSPSame");
     241
    234242        fHistSatHi.SetLineColor(kMagenta);
    235243        fHistSatLo.SetLineColor(kCyan);
    236 
    237244        fHistSizeMainIsland.SetLineColor(kMagenta);
    238245        fHistSizeSubIslands.SetLineColor(kCyan);
    239 
    240246        fHistIslands.SetLineColor(kGreen);
    241247        fHistNumSP.SetLineColor(kGreen);
     
    245251    pad->cd(1);
    246252    gPad->SetBorderMode(0);
     253    RemoveFromPad("SatHiSame");
     254    RemoveFromPad("SatLoSame");
    247255    MH::DrawSame(fHistSatHi, fHistSatLo, "Saturating Pixels", same);
    248256    fHistSatHi.SetMinimum();    // switch off to allow log-scale
     
    252260    pad->cd(4);
    253261    gPad->SetBorderMode(0);
     262    RemoveFromPad("SizeSubSame");
     263    RemoveFromPad("SizeMainSame");
    254264    MH::DrawSame(fHistSizeMainIsland, fHistSizeSubIslands, "Sizes...", same);
    255265    fHistSizeMainIsland.SetMinimum();    // switch off to allow log-scale
     
    265275        pad->GetPad(2)->cd(1);
    266276        gPad->SetBorderMode(0);
     277        RemoveFromPad("NumSPSame");
    267278        fHistNumSP.Draw(same?"same":"");
    268279        pad->GetPad(2)->cd(2);
    269280        gPad->SetBorderMode(0);
     281        RemoveFromPad("SizeSPSame");
    270282        fHistSizeSP.Draw(same?"same":"");
    271283    }
     
    273285    pad->cd(3);
    274286    gPad->SetBorderMode(0);
     287    RemoveFromPad("IslandsSame");
    275288    fHistIslands.Draw(same?"same":"");
    276289}
  • trunk/MagicSoft/Mars/mimage/MHNewImagePar.cc

    r6907 r6948  
    309309    else
    310310    {
     311        fHistLeakage1.SetName("Leakage1Same");
     312        fHistLeakage2.SetName("Leakage2Same");
     313        fHistUsedPix.SetName("UsedPixSame");
     314        fHistCorePix.SetName("CorePixSame");
     315        fHistUsedArea.SetName("UsedAreaSame");
     316        fHistCoreArea.SetName("CoreAreaSame");
     317        fHistConc1.SetName("Conc1Same");
     318        fHistConc.SetName("Conc2Same");
     319
    311320        fHistLeakage1.SetLineColor(kMagenta);
    312321        fHistLeakage1.SetLineColor(kCyan);
    313 
    314322        fHistCorePix.SetLineColor(kMagenta);
    315323        fHistUsedPix.SetLineColor(kCyan);
    316 
    317324        fHistConc1.SetLineColor(kMagenta);
    318325        fHistConc.SetLineColor(kCyan);
    319 
    320326        fHistCoreArea.SetLineColor(kMagenta);
    321327        fHistUsedArea.SetLineColor(kCyan);
     
    326332    TAxis &x = *fHistLeakage1.GetXaxis();
    327333    x.SetRangeUser(0.0, x.GetXmax());
     334    RemoveFromPad("Leakage1Same");
     335    RemoveFromPad("Leakage2Same");
    328336    MH::DrawSame(fHistLeakage1, fHistLeakage2, "Leakage1 and Leakage2", same);
    329337    fHistLeakage1.SetMinimum();
     
    333341    pad->cd(2);
    334342    gPad->SetBorderMode(0);
     343    RemoveFromPad("UsedPixSame");
     344    RemoveFromPad("CorePixSame");
    335345    MH::DrawSame(fHistCorePix, fHistUsedPix, "Number of core/used Pixels", same);
    336346
    337347    pad->cd(3);
    338348    gPad->SetBorderMode(0);
     349    RemoveFromPad("Conc1Same");
     350    RemoveFromPad("Conc2Same");
    339351    MH::DrawSame(fHistConc1, fHistConc, "Concentrations", same);
    340352
    341353    pad->cd(4);
    342354    gPad->SetBorderMode(0);
     355    RemoveFromPad("CoreAreaSame");
     356    RemoveFromPad("UsedAreaSame");
    343357    MH::DrawSame(fHistCoreArea, fHistUsedArea, "Area of core/used Pixels", same);
    344358}
  • trunk/MagicSoft/Mars/mimage/MHVsSize.cc

    r6890 r6948  
    269269    else
    270270    {
     271        fLength.SetName("LengthSame");
     272        fWidth.SetName("WidthSame");
     273        fDist.SetName("DistSame");
     274        fConc1.SetName("Conc1Same");
    271275        fDist.SetMarkerColor(kBlue);
    272276        fConc1.SetMarkerColor(kBlue);
     
    278282    gPad->SetBorderMode(0);
    279283    gPad->SetLogx();
     284    RemoveFromPad("LengthSame");
    280285    fLength.Draw(same?"same":"");
    281286
     
    283288    gPad->SetBorderMode(0);
    284289    gPad->SetLogx();
     290    RemoveFromPad("WidthSame");
    285291    fWidth.Draw(same?"same":"");
    286292
     
    288294    gPad->SetBorderMode(0);
    289295    gPad->SetLogx();
     296    RemoveFromPad("DistSame");
    290297    fDist.Draw(same?"same":"");
    291298
     
    294301    gPad->SetLogx();
    295302    gPad->SetLogy();
     303    RemoveFromPad("Conc1Same");
    296304    fConc1.Draw(same?"same":"");
    297305}
  • trunk/MagicSoft/Mars/mjobs/MJCut.cc

    r6941 r6948  
    227227// analysis number num, see GetOutputFile()
    228228//
    229 Bool_t MJCut::WriteResult(UInt_t num) const
     229Bool_t MJCut::WriteResult(const MParList &plist, UInt_t num) const
    230230{
    231231    TObjArray arr;
     232
     233    TIter Next(plist);
     234    TObject *o=0;
     235    while ((o=Next()))
     236        if (o->InheritsFrom(MBinning::Class()))
     237            arr.Add(o);
     238
    232239    return WriteContainer(arr, GetOutputFile(num), "UPDATE");
    233240}
     
    278285    write->AddContainer("MHillas",        "Events");
    279286    write->AddContainer("MHillasSrc",     "Events");
     287    write->AddContainer("MHillasExt",     "Events");
    280288    write->AddContainer("MPointingPos",   "Events");
    281289    write->AddContainer("MHillasSrcAnti", "Events", kFALSE);
     
    293301}
    294302
     303void MJCut::DisplayResult(const MParList &plist) const
     304{
     305    /*
     306     TObject *h1 = plist.FindObject("MHHillasOffPre",  "MHHillas");
     307     TObject *h2 = plist.FindObject("MHHillasOffPost", "MHHillas");
     308     TObject *h3 = plist.FindObject("MHVsSizeOffPost", "MHVsSize");
     309     TObject *h4 = plist.FindObject("MHHilExtOffPost", "MHHillasExt");
     310     TObject *h5 = plist.FindObject("MHHilSrcOffPost", "MHHillasSrc");
     311     TObject *h6 = plist.FindObject("MHImgParOffPost", "MHImagePar");
     312     TObject *h7 = plist.FindObject("MHNewParOffPost", "MHNewImagePar");
     313     */
     314}
     315
    295316Bool_t MJCut::ProcessFile(const MDataSet &set)
    296317{
     
    342363    MBinning bins3(50, 0,  60,   "BinningTheta",     "cos");
    343364    MBinning bins4("BinningFalseSource");
    344     //MBinning bins5("BinningWidth");
    345     //MBinning bins6("BinningLength");
    346     //MBinning bins7("BinningDist");
     365    MBinning bins5("BinningWidth");
     366    MBinning bins6("BinningLength");
     367    MBinning bins7("BinningDist");
     368    MBinning bins8("BinningMaxDist");
    347369    plist.AddToList(&bins1);
    348370    plist.AddToList(&bins2);
    349371    plist.AddToList(&bins3);
    350372    plist.AddToList(&bins4);
    351     //plist.AddToList(&bins5);
    352     //plist.AddToList(&bins6);
    353     //plist.AddToList(&bins7);
     373    plist.AddToList(&bins5);
     374    plist.AddToList(&bins6);
     375    plist.AddToList(&bins7);
     376    plist.AddToList(&bins8);
    354377
    355378    // --------------------------------------------------------------------------------
     
    623646    tlist.PrintStatistics();
    624647
     648    DisplayResult(plist);
     649
    625650    // FIXME: Perform fit and plot energy dependant alpha plots
    626651    // and fit result to new tabs!
    627     if (!WriteResult(set.GetNumAnalysis()))
     652    if (!WriteResult(plist, set.GetNumAnalysis()))
    628653        return kFALSE;
    629654
  • trunk/MagicSoft/Mars/mjobs/MJCut.h

    r6907 r6948  
    88class MTask;
    99class MDataSet;
     10class MParList;
    1011class MWriteRootFile;
    1112
     
    1819    Bool_t  fIsWobble;
    1920    Bool_t  fFullDisplay;
     21    //Bool_t  fSubstraction;
    2022
    2123    TString fNameSummary;
     
    3032    void    SetupWriter(MWriteRootFile *write, const char *name) const;
    3133    Bool_t  WriteTasks(UInt_t num, TObjArray &cont) const;
    32     Bool_t  WriteResult(UInt_t num) const;
     34    Bool_t  WriteResult(const MParList &plist, UInt_t num) const;
     35    void    DisplayResult(const MParList &plist) const;
    3336
    3437    Bool_t  CanStoreSummary() const { return !fPathOut.IsNull() && fStoreSummary; }
     
    4649    void EnableWobbleMode(Bool_t b=kTRUE)        { fIsWobble     = b; }
    4750    void EnableFullDisplay(Bool_t b=kTRUE)       { fFullDisplay  = b; }
     51    //void EnableSubstraction(Bool_t b=kTRUE)      { fSubstraction = b; }
    4852
    4953    void SetNameSummaryFile(const char *name="");
  • trunk/MagicSoft/Mars/mjobs/MJOptimize.cc

    r6939 r6948  
    228228}
    229229
    230 MJOptimize::MJOptimize() : fDebug(-1), fNumEvents(0), fType(kSimplex), fNumMaxCalls(0), fTolerance(0), fTestTrain(kFALSE)
     230MJOptimize::MJOptimize() : fDebug(-1), fNumEvents(0), fType(kSimplex), fNumMaxCalls(0), fTolerance(0), fTestTrain(0)
    231231{
    232232    fRules.SetOwner();
     
    661661    case kMigrad:    txt += "Migrad";    break;
    662662    case kMinimize:  txt += "Minimize";  break;
    663     case kMinos:     txt += "Minot";     break;
     663    case kMinos:     txt += "Minos";     break;
    664664    case kImprove:   txt += "Improve";   break;
    665665    case kSimplex:   txt += "Simplex";   break;
     
    682682    // In case the reader is the matrix loop and testrain is enabled
    683683    // switch on even mode...
    684     if (loop && fTestTrain)
    685         loop->SetOperationMode(MMatrixLoop::kEven);
     684    if (loop && TMath::Abs(fTestTrain)>0)
     685        loop->SetOperationMode(fTestTrain>0?MMatrixLoop::kEven:MMatrixLoop::kOdd);
    686686
    687687    if (!Optimize(evtloop))
     
    696696    // In case the reader is the matrix loop and testrain is enabled
    697697    // switch on odd mode...
    698     if (!loop || !fTestTrain)
     698    if (!loop || fTestTrain==0)
    699699        return kTRUE;
    700700
    701     loop->SetOperationMode(MMatrixLoop::kOdd);
     701    loop->SetOperationMode(fTestTrain<0?MMatrixLoop::kEven:MMatrixLoop::kOdd);
    702702
    703703    // Done already in Fcn
  • trunk/MagicSoft/Mars/mjobs/MJOptimize.h

    r6932 r6948  
    8484    UInt_t  fNumMaxCalls;
    8585    Float_t fTolerance;
    86     Bool_t  fTestTrain;
     86    Int_t   fTestTrain;
    8787
    8888    Bool_t Optimize(MEvtLoop &evtloop);
     
    110110    void SetNumMaxCalls(UInt_t num=0) { fNumMaxCalls=num; }
    111111    void SetTolerance(Float_t tol=0)  { fTolerance=tol; }
    112     void EnableTestTrain(Bool_t b=kTRUE) { fTestTrain=b; }
     112    void EnableTestTrain(Int_t b=2)  { fTestTrain=b; }
    113113
    114114    // Parameter access
Note: See TracChangeset for help on using the changeset viewer.