Ignore:
Timestamp:
04/11/05 16:15:08 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mjobs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mjobs/MJOptimize.cc

    r6907 r6924  
    228228}
    229229
    230 MJOptimize::MJOptimize() : fDebug(-1), fNumEvents(0), fType(kSimplex), fNumMaxCalls(0), fTolerance(0)
     230MJOptimize::MJOptimize() : fDebug(-1), fNumEvents(0), fType(kSimplex), fNumMaxCalls(0), fTolerance(0), fTestTrain(kFALSE)
    231231{
    232232    fRules.SetOwner();
     
    642642    }
    643643
     644    MMatrixLoop *loop = dynamic_cast<MMatrixLoop*>(parlist.FindTask("MRead"));
     645
    644646    TString txt("Starting ");
    645647    switch (fType)
     
    666668    *fLog << inf << "Number of Parameters: " << fParameters.GetSize() << endl;
    667669
     670    // In case the reader is the matrix loop and testrain is enabled
     671    // switch on even mode...
     672    if (loop && fTestTrain)
     673        loop->SetOperationMode(MMatrixLoop::kEven);
     674
    668675    if (!Optimize(evtloop))
    669676        return kFALSE;
     
    672679
    673680    fEvtLoop->SetDisplay(fDisplay);
    674     return Fcn(fParameters);
     681    if (!Fcn(fParameters))
     682        return kFALSE;
     683
     684    // In case the reader is the matrix loop and testrain is enabled
     685    // switch on odd mode...
     686    if (!loop || !fTestTrain)
     687        return kTRUE;
     688
     689    loop->SetOperationMode(MMatrixLoop::kOdd);
     690
    675691    // Done already in Fcn
    676692    // list.SetVariables(fParameters);
     693    return Fcn(fParameters);
    677694}
    678695
  • trunk/MagicSoft/Mars/mjobs/MJOptimize.h

    r6896 r6924  
    8484    UInt_t  fNumMaxCalls;
    8585    Float_t fTolerance;
     86    Bool_t  fTestTrain;
    8687
    8788    Bool_t Optimize(MEvtLoop &evtloop);
     
    108109    void SetNumMaxCalls(UInt_t num=0) { fNumMaxCalls=num; }
    109110    void SetTolerance(Float_t tol=0)  { fTolerance=tol; }
     111    void EnableTestTrain(Bool_t b=kTRUE) { fTestTrain=b; }
    110112
    111113    // Parameter access
Note: See TracChangeset for help on using the changeset viewer.